LR covariance in COINTREG versus LRCOV
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
ClintonGreene
- Posts: 15
- Joined: Wed Sep 28, 2011 2:08 pm
LR covariance in COINTREG versus LRCOV
The equation command COINTREG outputs the two-sided and one-sided long run covariance data members @lrcov and @lambda12cov To be sure I understand what this equation command is doing, I am trying to reproduce these data members using my own calculations of the cointegrating ols and x-var residuals, and then applying the group procedure LRCOV. My results consistently differ. Perhaps I am not using equivalent options in the LRCOV procedure, or perhaps I am making an error in expecting equivalence of the two approaches. Attached is a program which generates simulated data, then compares the two approaches to calculating the long run covariances. I would appreciate comment on whether the two approaches should be equivalent and if so, what modification is needed to get equal results.
- Attachments
-
- sim_fmols04.prg
- (2.72 KiB) Downloaded 415 times
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: LR covariance in COINTREG versus LRCOV
Couple of things...
1. To answer your question as posed in the code. Yes, you want the first-stage regression to be over the whole sample (as you currently do).
2. The cointegrating regressors specification that you are estimating by hand differs from what you specified for EViews to compute. You are estimating a model in which there is a constant in the difference equations (which is the same as having a trend in the regressors specification). Your cointreg model doesn't have a regressor trend. You can change your code to match the cointreg specification modifying your commands to use
3. Your LRCOV computations need to have a NOC option to not use a constant term.
The resulting differences between the hand and the EViews computed matrices are on the order of 1e-15.
1. To answer your question as posed in the code. Yes, you want the first-stage regression to be over the whole sample (as you currently do).
2. The cointegrating regressors specification that you are estimating by hand differs from what you specified for EViews to compute. You are estimating a model in which there is a constant in the difference equations (which is the same as having a trend in the regressors specification). Your cointreg model doesn't have a regressor trend. You can change your code to match the cointreg specification modifying your commands to use
Code: Select all
genr u_yh = cx1
genr y_r = cx2
Code: Select all
gu.lrcov(window=sym,noc,lag=1,kern=bart,bw=fixednw,noc,out=omega) 'estimate long-run covariance, results placed in omega
gu.lrcov(window=lower,noc,lag=1,kern=bart,bw=fixednw,noc,out=lambda) 'estimate one-sided (lag) covariance, results placed in lambda.
Last edited by EViews Glenn on Mon Feb 06, 2012 4:49 pm, edited 1 time in total.
-
ClintonGreene
- Posts: 15
- Joined: Wed Sep 28, 2011 2:08 pm
Re: LR covariance in COINTREG versus LRCOV
Thank you, very helpful.
-
ClintonGreene
- Posts: 15
- Joined: Wed Sep 28, 2011 2:08 pm
Re: LR covariance in COINTREG versus LRCOV
Tried making the suggested changes, still get a difference in the two-sided lrcov more on the order of 10^-3. If you get different results running the same program, then this is a mystery. I am using Eviews 7.2 under WinXP.
If you modified the program and found a difference of more on the order of 10^-15, could you please email it to me to be sure we are working with the same modifications? My own version modified as I think you suggested is attached, I must be missing something.
I am also attaching an example of working file results, in which the matrix object "dif_omega" displays the difference between the lrcov (omega) as calculated via the two commands (cointreg vs lrcov).
Thanks again
If you modified the program and found a difference of more on the order of 10^-15, could you please email it to me to be sure we are working with the same modifications? My own version modified as I think you suggested is attached, I must be missing something.
I am also attaching an example of working file results, in which the matrix object "dif_omega" displays the difference between the lrcov (omega) as calculated via the two commands (cointreg vs lrcov).
Thanks again
- Attachments
-
- sim05.WF1
- (30.07 KiB) Downloaded 343 times
-
- sim_fmols05.prg
- (2.41 KiB) Downloaded 433 times
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: LR covariance in COINTREG versus LRCOV
You have to estimate your EViews COINTREG on the full sample since that's what your by-hand calculations are using.
Code: Select all
smpl @all
equation e_eviews.cointreg(method=fmols, trend=const, regdiff, regtrend=none, lag=1, kern=bart, bw=fixednw) y x1 x2
-
ClintonGreene
- Posts: 15
- Joined: Wed Sep 28, 2011 2:08 pm
Re: LR covariance in COINTREG versus LRCOV
OK, now my results are consistent.
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: LR covariance in COINTREG versus LRCOV
Note that since you have regtrend=none, the regdiff option shouldn't matter. If you have a constant or a trend, then it will.
Who is online
Users browsing this forum: No registered users and 2 guests
