Search code examples
selectioncriteriastatalag

Stata: Lag length criteria: How can I explain the results?


I got different outputs from the code

forval i = 1/118 {
    varsoc var`i', maxlag(10)
}

that gives AIC,BIC,... lag information criteria, but I don't know how I can interpret them. How can I choose the correct number of lags on the basis of all this output?

I know that, if I have only one variable, I've to choose the smallest value of AIC and the others, but what should I do if I have more outputs?


Solution

  • The answer depends on what you want to do. Minimizing AIC or BIC is one criterion for selecting a lag length. You have multiple variables; are you trying to fit separate models to each variable or a single vector autoregression? In the later case, you should use Stata's varsoc command with multiple variables and choose the lag that way. For example,

    varsoc x y z, maxlag(10)
    

    will calculate an optimal lag length (according to AIC, BIC, etc.) for a vector autoregression with variables x, y, and z. Suppose the answer is 3 lags according to BIC (recommended for VAR). Then the model can be fit using:

    var x y z, lags(1 2 3)
    

    If you need to restrict certain lags to zero for certain coefficients, use the constraint command. For example, you need the third lag on x in the equation for y to be zero (maybe there are theoretical reasons for this). The following will work:

    constraint 1 [y]L3.x = 0
    var x y z, lags(1 2 3) constraints(1)