1

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:

  1. Is this a good method to choose the lags in the test?
  2. 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)
Anna
  • 119
  • 5
  • 1
    Note that Ljung-Box might not be appropriate for residuals from a VAR model (regardless of the fact that it has been used extensively in the past and continues to be used today): see ["Testing for autocorrelation: Ljung-Box versus Breusch-Godfrey"](https://stats.stackexchange.com/questions/148004). The linked thread considers ARMA instead of VAR, but the basic logic should apply also for VAR. You will find the conclusion in the penultimate paragraph of Alecos' answer. (I am sorry for bearing bad news.) – Richard Hardy Mar 09 '21 at 14:17
  • And another question: After using the Breusch-Godfrey test (I used the same rule of thumb h=min(10,T/5) for the lag order for now...) I have way more autocorrelation (which makes sense according to the answer you linked). Now what can I do against that? I tried to set higher lag orders in the VAR model but that didn't really help (not with every model). I could use the HAC estimator for the Granger causality, right? But is this also a good idea when there is no heteroscedasticity but only autocorrelation? – Anna Mar 09 '21 at 16:07
  • Yes, you could use HAC; the A in HAC stands for autocorrelation. – Richard Hardy Mar 09 '21 at 16:11

0 Answers0