Page 1 of 1

HAC regression - manually specify lags

Posted: Fri Jul 24, 2009 2:09 pm
by cap
Hello,

When doing a HAC regression (newey west standard errors), I see in the documentation that the lag truncation is automatically determined according to some formula ... is it possible to instead manually specify this ourselves?

Thanks
-cap

Re: HAC regression - manually specify lags

Posted: Fri Jul 24, 2009 2:50 pm
by EViews Gareth
Short Answer: No.

Longer Answer: You could estimate your equation as a GMM estimation, using inputting your regressors as instruments (although this only works if you have a constant in your regressors, since EViews always adds a constant to the instrument list). This will let you specify the lag truncation for Newey-West.

The one problem with the GMM solution is that the degree-of-freedom correction for the standard errors is different from a Least-Squares regression. You'd have to multiply your standard-errors by sqrt(T/(T-k)) to get them to match.

Re: HAC regression - manually specify lags

Posted: Fri Jul 24, 2009 3:05 pm
by EViews Gareth
Just a quick program to prove that you can replicate LS Newey-West by estimating an equation by GMM:

Code: Select all

rndseed 1 !t=100 !k=3 create u !t series y=nrnd series x1=nrnd series x2=nrnd equation e1.ls(n) y c x1 x2 equation e2.gmm(b=4) y c x1 x2 @ x1 x2 vector ses = e2.@stderrs ses = ses * @sqrt(!t/(!t-!k)) show e1 show ses
Then, if you want to use a different lag truncation, you could change the "b=4" option to "b=" whatever number you want.

Re: HAC regression - manually specify lags

Posted: Fri Jul 24, 2009 3:48 pm
by cap
Thanks very much for your help!