Testing the appropriate lag length in a VAR

For econometric discussions not necessarily related to EViews.

Moderators: EViews Gareth, EViews Moderator

Szi
Posts: 15
Joined: Sun May 16, 2010 8:21 pm

Testing the appropriate lag length in a VAR

Postby Szi » Thu May 27, 2010 5:42 pm

I am estimating a VAR model on some long time series data, but have a question about EViews' (6) method for determining the appropriate lag length of the VAR.

The approach is to use:
'view' - 'lag structure' - 'lag length criteria'
which gives you the option of choosing how many lags to include in the lag specification. EViews then uses the AIC, SC and HQ criteria to suggest the optimal lag length for that particular VAR.

HOWEVER, the choice of 'lag specification' makes a big difference to the recommended order of the VAR by all three criterions. And this in turn makes a big difference to the outcome of subsequent coefficient tests.

How do I determine the appropriate number of lags to include in this test? Does Eviews have any method for this?
If not, does anyone have any guidance?

Thanks for your help!
Simon

Szi
Posts: 15
Joined: Sun May 16, 2010 8:21 pm

Re: Testing the appropriate lag length in a VAR

Postby Szi » Mon Aug 23, 2010 10:26 pm

If anyone is interested I eventually worked out the answer to this question.

Eviews uses incorrect Standard Errors in the AIC, SIC and HQ tests when using the automatic lag length selection option for a VAR. To get around this, when using the 'lag length selection' option, include all possible lengths ONE-AT-A-TIME, recording the values of all three criteria each time. Once you have done this for all possible lag lengths, compare the values. The lowest value for each criterion is its chosen VAR length, and this has now used the correct standard errors.

As this takes a while, I wrote a program to do this for me.
Hope that helps

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13583
Joined: Tue Sep 16, 2008 5:38 pm

Re: Testing the appropriate lag length in a VAR

Postby EViews Gareth » Tue Aug 24, 2010 8:07 am

I'm not sure I follow what you're saying here.

How does EViews use the incorrect standard errors, and how does your method change that?

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

Re: Testing the appropriate lag length in a VAR

Postby EViews Glenn » Tue Aug 24, 2010 9:14 am

To add to Gareth's comment on Szi's post, I'm not quite certain how standard errors fit into the discussion since the information criteria only involve the likelihoods.

Most likely what Szi found is that, as with other information criteria comparisons involving lags, EViews uses a common sample across the various models so that the criteria can be compared. Thus, when estimating with each lag, one needs to use the sample associated with the highest order lag for which you are testing, otherwise the IC are not comparable.

Szi
Posts: 15
Joined: Sun May 16, 2010 8:21 pm

Re: Testing the appropriate lag length in a VAR

Postby Szi » Tue Aug 24, 2010 3:16 pm

Sorry, didnt mean to say standard errors at all - was writing about them in a different post. What I meant to say was log likelihoods - Eviews uses incorrect log likelihoods to determine the AIC, SIC and HQ at every lag other than the maximum lag you have allowed, which is why the lag length suggested by each of the criteria sometimes change as you alter the maximum lags allowed.

For example, if you change the maximum lags from 8 to 10, the recommendations may change from 2 to 3, even though 3 was a possible option under both maximum lag choices.

As only the maximum lag you have allowed is using the correct log likelihood, you have to do the 'lag length criteria' test for each possible lag length, recording the values of the criteria at the maximum lag. Then you can compare them all and make a decision for the true length of the VAR based on that. Thats what I used the program for.

Does this sound about right?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13583
Joined: Tue Sep 16, 2008 5:38 pm

Re: Testing the appropriate lag length in a VAR

Postby EViews Gareth » Tue Aug 24, 2010 3:23 pm

No.

When comparing different models of any kind (including VARs), you have to use the same set of observations for all of the models. From your brief description it sounds as though you are not doing this.

It still isn't clear what you mean by "incorrect log likelihoods". What makes you think they are incorrect?

Szi
Posts: 15
Joined: Sun May 16, 2010 8:21 pm

Re: Testing the appropriate lag length in a VAR

Postby Szi » Tue Aug 24, 2010 3:33 pm

What I mean is that they change according to the maximum lag you have entered. For example, using the same VAR (three variables, 49 observations):

When I allow a maximum lag of 5:
Lag LogL
0 -2583.633
1 -2400.191
2 -2386.086
3 -2381.116
4 -2370.323
5 -2364.053

But when I allow a maximum lag of 10:
Lag LogL
0 -2479.812
1 -2303.666
2 -2287.090
3 -2282.515
4 -2269.957
5 -2262.182
6 -2256.872
7 -2244.553
8 -2215.715
9 -2205.091
10 -2196.204

So Eviews is providing different log likelihood values for lags 0-5 when I change the maximum lag length. I thought that the log likelihood for each lag length should remain fixed, so that we could compare the fit of the model and find the best lag length. Otherwise, isnt the recommendation of each of the criteria just based on the arbitrary assumption of how many maximum lags to include?

startz
Non-normality and collinearity are NOT problems!
Posts: 3796
Joined: Wed Sep 17, 2008 2:25 pm

Re: Testing the appropriate lag length in a VAR

Postby startz » Tue Aug 24, 2010 3:39 pm

Gareth is suggesting you have missing data that's affected by the sample. Can I suggest posting the workfile, including VAR?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13583
Joined: Tue Sep 16, 2008 5:38 pm

Re: Testing the appropriate lag length in a VAR

Postby EViews Gareth » Tue Aug 24, 2010 3:42 pm

Again, EViews will automatically use the same observations. Thus with a maximum lag of 5, and with a total of 49 observations, 44 will be used for all comparisons. With a maximum lag of 10, 39 will be used. Thus your two examples are using different observations, so it is not surprising that they give different likelihoods.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13583
Joined: Tue Sep 16, 2008 5:38 pm

Re: Testing the appropriate lag length in a VAR

Postby EViews Gareth » Tue Aug 24, 2010 3:42 pm

Gareth is suggesting you have missing data that's affected by the sample. Can I suggest posting the workfile, including VAR?
No, that's not what I am suggesting. (See above)

Szi
Posts: 15
Joined: Sun May 16, 2010 8:21 pm

Re: Testing the appropriate lag length in a VAR

Postby Szi » Tue Aug 24, 2010 3:52 pm

Again, EViews will automatically use the same observations. Thus with a maximum lag of 5, and with a total of 49 observations, 44 will be used for all comparisons. With a maximum lag of 10, 39 will be used. Thus your two examples are using different observations, so it is not surprising that they give different likelihoods.
But isnt that an incorrect comparison? Surely the appropriate number of observations to use would be the number that would be used if I was to estimate the VAR with the given lag length - if I chose a lag of 5, I would use 44 observations, not 39.
So isnt the appropriate comparison the one using the maximum number of observations for each lag length, as opposed to what Eviews is doing?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13583
Joined: Tue Sep 16, 2008 5:38 pm

Re: Testing the appropriate lag length in a VAR

Postby EViews Gareth » Tue Aug 24, 2010 3:58 pm

No. As mentioned above, you cannot compare different models that use different observations. You're comparing apples to oranges.

Szi
Posts: 15
Joined: Sun May 16, 2010 8:21 pm

Re: Testing the appropriate lag length in a VAR

Postby Szi » Tue Aug 24, 2010 4:10 pm

So in terms of choosing the maximum number of lags to allow, what would your suggestion be?
It seems to me to be a bit arbitrary, especially since if I choose the maximum lags the data will allow I can practically guarantee that the criteria will choose the highest lag length every time.. as I'm dealing with macroeconomic series, this doesnt seem plausible.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13583
Joined: Tue Sep 16, 2008 5:38 pm

Re: Testing the appropriate lag length in a VAR

Postby EViews Gareth » Tue Aug 24, 2010 4:15 pm

In general, using a statistical technique, such as information criteria, to select the number of lags, is probably inferior to using sound economic judgement.

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

Re: Testing the appropriate lag length in a VAR

Postby EViews Glenn » Tue Aug 24, 2010 5:21 pm

Serena Ng and Pierre Perron
A Note on the Selection of Time Series Models
OXFORD BULLETIN OF ECONOMICS AND STATISTICS, 67, 1 (2005) 0305-9049

discusses the univariate case. The VAR case follows directly.


Return to “Econometric Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest