# Maximum lag length for serial correlation test on VAR residuals

I do have a dataset with monthly data. I apply

serial.test(VAR,lags.pt=12, lags.bg=12, type="both")


from the vars package to test for serial correlation in the residuals.

Considering that the data is a monthly time series, with a total of 72 observations (06/2006 - 06/20012), is using a maximum lag of 12 appropriate? Some literature states that the lag length should reflect the seasonality of data.

VARselect(VAR,lag.max = 12,type="both")


proposes 1 or 4. I subsequently look with above mentioned serial.test for the best fit and wonder which lag to use here.

I assume that I should select the same lag length for the test for serial correlation, as for the VARselect model fit itself, in order to relate my analysis of serial correlation to the same type of data?

• I suppose you are testing autocorrelation (a.k.a. serial correlation) rather than stability. – Richard Hardy Sep 4 '17 at 17:56
• See "Thoughts on the Ljung-Box test" by Rob J. Hyndman. – Richard Hardy Sep 4 '17 at 18:05
• Agree, sorry. I am testing autocorrelation. – FenleyK Sep 4 '17 at 18:37
• @RichardHardy isn't the Box.test only suitable for univariate time series? – FenleyK Sep 4 '17 at 18:38
• Considering the link in the Ljung Box test, h would be "24" (2x12 (m)). Given that the whole time series is only 72 obs. I think 12 is okay then. – FenleyK Sep 4 '17 at 18:53