Having troubles with the lag specification of a VAR-model. The purpose of the model is to measure orthogonal impulse/response function of oil price shocks on macroeconomic variables, such as GDP-growth, unemployment rate, inflation-rate and interest-rate. These are quarterly observations from 2001-2019 so a total of 73 observations. The variables have been put in recursively in the set in the following order (oil price, unemployment, GDP, inflation, interest rates).

All the variables (including log oil price) has been checked for stationarity using ADF/KPSS and corrected for if not stationary. The problem comes when it's time to select the lag-length in the VAR-model. I'm doing this in R so by using the command:

VARselect(data, type= "const", lag.max = 10)

AIC suggest a lag-length of 10 which I suppose is not consistent results since it uses up a lot degrees of freedom to estimate all the coefficients in the model. (My guess is that 1-4 lags would be reasonable.) My question is therefore, what I'm I doing wrong here or is it something I have to do/check for in the specification of the variables so that VARselect can "work" properly on the dataset? Any suggestion or guidance would be highly appreciated, thank you!

Cholesky decomposition

            DOIL          DU        BNP        CPI       INT
DOIL 0.1602771091  0.00000000 0.00000000 0.00000000 0.0000000
DU   0.0001141673  0.27248971 0.00000000 0.00000000 0.0000000
BNP  0.2263674542 -0.35994187 1.15985788 0.00000000 0.0000000
CPI  0.1796382036 -0.03355081 0.04371295 0.29855876 0.0000000
INT  0.1645450500 -0.07566300 0.07504165 0.06567306 0.2237841
  • $\begingroup$ what did you do to correct your variables if not stationary? $\endgroup$
    – Martin
    Commented Oct 23, 2019 at 7:38
  • 1
    $\begingroup$ @Martin The variables that were not stationary I took their first differences. I got a suggestion to estimate VAR(1) and check if I had any autocorrelation in the residuals, if I had any I would proceed to estimate VAR(2) until there were no autocorrelation. Since AIC suggest VAR(10) but BIC VAR(1) when using VARselect, this seems like an appropriate solution, but I do not know if this violates the “golden middle” of the information criterion $\endgroup$ Commented Oct 24, 2019 at 8:19

1 Answer 1


Determining optimal lags is a double-edged sword. I agree with the procedure mentionend in the comments in principle. The advantage is that you will save degrees of freedom.

Other suggetions: -You could try to seasonal adjust your data. This might reduce the "needed" lags.

Some generel comments on your Var: -Do you checked for cointegration? Might worth it here -your Variable order seems to be wrong. Oil prices are very volatile. Why should they react slowest?

  • $\begingroup$ Thank you for the input! The variables that are not seasonly adjusted are inflation, oil prices and intrest-rate (gdp and unemployment are adjusted). I have not checked cointegration, could you perhaps help on how that is done? The order is that oil affect all other variables but the other variables doesn't affect oil prices (Swedish data). And so the oil price is determined exogenous. Previous studies order oil prices first or last, and have found little diffrence between the to, but since Sweden is a price-taker it feels logical to order it first. $\endgroup$ Commented Oct 24, 2019 at 10:04
  • $\begingroup$ For cointegration check: econometrics-with-r.org/16-3-cointegration.html $\endgroup$
    – Martin
    Commented Oct 24, 2019 at 10:43
  • $\begingroup$ I assume you use R? The ordering of your variables can change depending on your statistical program/code. It depends what sort of cholesky decomposition you use. The vars package uses a lower triangular matrix matrix (check 'vars:::.irf' and 'vars:::Psi.varest' ). Therefore the variable orderd LAST is the variable which does not influence the other variables in the same period. $\endgroup$
    – Martin
    Commented Oct 24, 2019 at 10:48
  • $\begingroup$ I've added the cholesky decomp in the post. As I understand it the equation that is written first in the system is not affected by the following variables at time t. That is inline with what you are saying, right? $\endgroup$ Commented Oct 24, 2019 at 11:38
  • 1
    $\begingroup$ Your opinion is certainly not wrong, i slow-to-fast is the general consensus of ordering variabels. Suggesting the same as you, but since oil prices are determind exogenously by OPEC it is logical to assume it will only be affected by itself and not by the swedish economy. Jiménez-Rodríguez and Sanchéz, 2004 had following order: real GDP, real oil price, inflation, short-term interest rate, long-term interest rate, real wage, and REER. Bernanke, Gertler, and Watson 1997 orderd oil prices 4:th. Burbidge & Harrison 1984 orderd oil orice 1:st. $\endgroup$ Commented Oct 24, 2019 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.