LogL: How to get the gradient other than at estimated value

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

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

LogL: How to get the gradient other than at estimated value

Postby maxchen » Tue Dec 02, 2008 6:11 am

In fact, I like to find the Hessian for a likelihood object to compute the robust variance. It seems that EViews does not provide one.
I try to compute the numerical derivative of gradient vector. Thus, the gradient at b+h (b is the estimated parameter and h is some step size) should be calculated for Hessian. However, the procedure makegrads generates gradients at b, and the view grads also at b once Logl object has been estimated.

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

Re: LogL: How to get the gradient other than at estimated value

Postby EViews Glenn » Tue Dec 02, 2008 1:22 pm

The gradient view will compute the gradients at the current coefficients if the logl is not estimated, and at the estimated coefficients if it is. Unfortunately, the makegrads proc will only work with an estimated logl.

Obviously, if you have analytic gradients in your logl specification, you can simply use them to set up your numeric seconds. If you don't, then the easiest thing to do is to us your objective functions and compute them directly.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 52 guests