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
HAC regression - manually specify lags
Moderators: EViews Gareth, EViews Moderator
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: HAC regression - manually specify lags
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.
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.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: HAC regression - manually specify lags
Just a quick program to prove that you can replicate LS Newey-West by estimating an equation by GMM:
Then, if you want to use a different lag truncation, you could change the "b=4" option to "b=" whatever number you want.
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
Re: HAC regression - manually specify lags
Thanks very much for your help!
Who is online
Users browsing this forum: No registered users and 2 guests
