I have several VAR Models with mostly AIC as lag criterion. For the Ljung-Box test I read about the rule of thumb of choosing h=min(10,T/5)
with T=number observations (https://robjhyndman.com/hyndsight/ljung-box-test/). In my models this would always be 10. But when increasing the lag order in the VAR models to decrease autocorrelation they sometimes exceed 10 so that the Ljung-Box-Test in the portes
package has df=0
and p.value=NA
, because the lag order in the VAR()
model(p) ist bigger than the lag order in the LjungBox()
test (h). Now I found that the default setting for the LjungBox()
test takes seq(5,30,5)
like in the Hosking version of Portmanteau test and somehow chooses a lag order h for the test out of this sequence. My questions are the following:
- Is this a good method to choose the lags in the test?
- How is a lag order chosen out of this sequence? The test statistic is then given for every possible lag (5,10,15,20,25,30), but which test statistic is for me to choose and interpret?(I looked in Hosking's paper but couldn't find any hint: https://doi.org/10.2307/2287656)