One-sided accurate numeric derivatives

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

One-sided accurate numeric derivatives

Postby maxchen » Tue Aug 24, 2010 1:18 am

Should it be "One-sided fast numeric derivatives"?

Code: Select all

!N = 1000 wfcreate(page=gm) u 1 !N rndseed(type=mt) 12357 coef b = 1 coef r = 2 genr y = @rgamma(b(1),r(1)) 'random of Gamma dist logl L_g L_g.append @logl L L_g.append L = @log( @dgamma(y,b(1),r(1)) ) L_g.append @derivstep(1) @all 1.49e-8 1e-10 L_g.append @param b(1) 0.05 r(1) 2 freeze(tb0) L_g.ml(showopts) freeze(tb1) L_g.checkderivs
Then check the top of tb1, "One-sided accurate numeric derivatives". I think one-sided for speed, and two-sided for accuracy.

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: One-sided accurate numeric derivatives

Postby trubador » Tue Aug 24, 2010 4:25 am

The default is "numeric derivatives" in LogL object. You can control the "Accuracy" and "Speed" for both "Analytical" and "Numerical" derivatives. Therefore, although "One-sided accurate numeric derivatives" are faster than that of "Two-sided accurate numeric derivatives", it is not "One-sided fast numeric derivatives", which requires explicit specification of "Speed" as the method of taking derivatives.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: One-sided accurate numeric derivatives

Postby EViews Glenn » Tue Aug 24, 2010 9:08 am

To elaborate on Trubador's response. The fast numeric derivatives are simple two point (two-sided) evaluations. The accurate numeric derivatives are RIchardson derivatives which evaluate at four points. Note that EViews does not compute one-sided numeric derivatives.

One last comment. The fast/accurate distinction when using analytic derivatives is only relevant for those terms for which we cannot determine the analytic expression for the derivative.

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

Re: One-sided accurate numeric derivatives

Postby maxchen » Wed Aug 25, 2010 5:08 am

hmm, but [f(x+h)-f(x)]/h is called one-sided, and [f(x+h)-f(x-h)]/(2h) is called two-sided

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: One-sided accurate numeric derivatives

Postby EViews Glenn » Wed Aug 25, 2010 9:23 am

That is correct and does not contradict anything that I wrote. EViews only does two-sided or Richardson numeric derivatives. The two-sided are the fast and the Richardson are the accurate.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests