quasi MLE standard errors

For questions regarding programming in the EViews programming language.

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

KarinL
Posts: 25
Joined: Thu Feb 03, 2011 8:45 am

quasi MLE standard errors

Postby KarinL » Thu Apr 07, 2011 7:19 am

Hey. I'm using Eviews7.
I am estimating a GARCH model using a likelihood approach, i.e. using a LoglObject.

I want to construct robust t-stats by using the Bollerslev-Woolridge estimator for the standard errors. Since I didn't find it already implemented, I'd like to calculate those "by hand".
Herefore, I need an estimator of the Hessian of the likelihood function and the outer product of the gradient vector with itself, both evaluated at the parameter estimates.

I'm not sure in what way these are readily available in the Logl Object.
I'd be very grateful for any hints...

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

Re: quasi MLE standard errors

Postby EViews Glenn » Thu Apr 07, 2011 11:02 am

The gradients are available using the Make Gradients proc. You can then use the stom command to save them in a matrix. Alternately, you can get the OPG by inverting the default coefficient covariance matrix.

Hessians are not available in the Logl. If I recall correctly, however, the Bollerslev-Wooldrige covariances don't use the Hessian as the estimate of the expected Information. The Bollerslev-Wooldrige [edit]estimate of the Information matrix can be computed from the gradients, but I don't recall off of the top of my head the formula. It's certainly described in the original paper
Last edited by EViews Glenn on Thu Apr 14, 2011 10:23 am, edited 1 time in total.

KarinL
Posts: 25
Joined: Thu Feb 03, 2011 8:45 am

Re: quasi MLE standard errors

Postby KarinL » Fri Apr 08, 2011 1:55 am

Thank you.

Well, the formula I found for calculating the QMLE covariance estimator is: T^{-1} ( I_1 * I_2^{-1} * I_1 )^{-1},
where I_1 is the outer product of the gradient vector with itself,
and I_2 is the negative Hessin Matrix evaluated at the parameters.

Is there any way to compute the Hessian?

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

Re: quasi MLE standard errors

Postby EViews Glenn » Fri Apr 08, 2011 9:39 am

That's the standard form for QMLE but not the one typically used in ARCH.

Computing the Hessian using the LogL is not going to be easy. There's nothing built-in. You might be able to do it by putting analytic equations for the Hessian into the LogL or by putting equations into the LogL that allow you to do the numeric derivatives. But that's about it...

KarinL
Posts: 25
Joined: Thu Feb 03, 2011 8:45 am

Re: quasi MLE standard errors

Postby KarinL » Mon Apr 11, 2011 8:09 am

Thank you for your replies.
I didn't look at the original paper yet, but I found the formula in hamiltons time series analysis.

Could you tell me, how EViews calculates the robust standard errors when estimating GARCH in an equation object? That would help me a lot.
Basically, I just want to replicate the computation of robust errors using my Logl Object. I didn't find an explicit formula in the User Guides.

KarinL
Posts: 25
Joined: Thu Feb 03, 2011 8:45 am

Re: quasi MLE standard errors

Postby KarinL » Thu Apr 14, 2011 9:37 am

Hello.
I had a look at the B&W paper. They derive an expresson for an estimator for the B&W errors which requires no second derivatives. Could you tell me if Eviews internally uses this formula with first derivatives normally calculate the B&W errors, that is when estimating an GARCH equation? Otherwise, please tell me if I should post this question to another forum.
I'd really appreciate your help.

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

Re: quasi MLE standard errors

Postby EViews Glenn » Thu Apr 14, 2011 10:14 am

Yes. EViews computes Bollerslev-Wooldridge standard errors as described in the paper...

KarinL
Posts: 25
Joined: Thu Feb 03, 2011 8:45 am

Re: quasi MLE standard errors

Postby KarinL » Tue Apr 26, 2011 1:21 am

Unfortunately, I am still struggeling with computing robust standard errors.

The formula given in B&W uses first derivatives of the conditional variance wrt to the parameters. In my case, analytical derivatives are very tricky to program, so I was wondering whether there is anything built-in,
to get numerical derivatives?

Does anyone have any suggestins how to compute robust errors when working with a Logl object?
I'm sure I am not the first one esitmating a GARCH model with likelihood methods in Eviews and needing robust errors...

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

Re: quasi MLE standard errors

Postby EViews Glenn » Tue Apr 26, 2011 10:41 am

The Make Gradients proc will return the matrix of first derivatives.

KarinL
Posts: 25
Joined: Thu Feb 03, 2011 8:45 am

Re: quasi MLE standard errors

Postby KarinL » Wed Apr 27, 2011 5:33 am

thats for the gradients of the likelihood, right?

However, the formula to calculate the B&W errors uses also gradients of the conditional variance process with respect to the parameters.
If Eviews internally uses this formula, how does it get those derivatives?

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

Re: quasi MLE standard errors

Postby EViews Glenn » Wed Apr 27, 2011 9:12 am

Those are for the likelihood with respect to the parameters.
Numeric derivatives. Looks like you'll have to take your expressions which compute the conditional variance and use them to compute numeric derivatives.

KarinL
Posts: 25
Joined: Thu Feb 03, 2011 8:45 am

Re: quasi MLE standard errors

Postby KarinL » Thu Apr 28, 2011 1:11 am

How can I get numeric derivatives of my expression for the conditional variance? Is there any built-in function? I didn't find anything in the manual.

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

Re: quasi MLE standard errors

Postby EViews Glenn » Thu Apr 28, 2011 9:31 am

What you are doing with the log-likelihood object is to produce a custom estimator. The calculation of the conditional variance is specific to the model you are trying to estimate. That's why there's nothing in the manual... Note also that what you want to do isn't really in the realm of what the object is currently designed to support. I'm afraid that you are not going to find anything specific to what you want to calculate in our manual.

There will, however, be general discussions that will be of use. For example, bear in mind that the expressions in your logl are series expressions. They can be evaluated inside of the logl or outside of the logl. Putting them in the logl is a convenient way of evaulating for each update of the parameters.

Since you are computing an arch model you already have equations for the conditional variance. Given that, what you can do is to put additional equations in your logl which evaluate the conditional variance at the coefficients plus a small value and (if you wish) minus a small value of what you are trying to differentiate with respect to. This is going to be messy, but can be done. Then put additional equations for the derivatives based on these small changes...

Or you could do it outside the logl using the series expressions.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 3 guests