0
$\begingroup$

Why do we need adjustment when applying Ljung-Box test over residuals? The following is from the Multivariate Time Series Analysis by R. Tsay.

m1 = VAR(data.ts,p=2)
resi=m1$residuals ### Obtain the residuals of VAR(2) fit.
mq(resi,adj=18) ## adj is used to adjust the degrees of freedom.

Regarding the above comment, why and how do we decide a value for adj?

$\endgroup$
  • $\begingroup$ Are you asking why the adjustment is a specific number (for this model or for any VAR model), or why there needs to be an adjustment at all (roughly, because the residuals aren't observations, they are estimates)? $\endgroup$ – Chris Haug May 4 '17 at 12:00
  • 1
    $\begingroup$ Mark, see this answer for an explanation why the adjustment is needed in the first place. It is not very intuitive, but it gives some details. $\endgroup$ – Richard Hardy May 4 '17 at 14:13
2
$\begingroup$

The code you cite appears on page 72 of the book. Right before it, on page 71 you read:

Compared with the Portmanteau test of Chapter 1, the degrees of freedom of the chi-square distribution in Theorem 2.6 is adjusted by $pk^2$, which is the number of AR parameters in a VAR(p) model. In practice, some of the AR parameters in a VAR(p) model are fixed to 0. In this case, the adjustment in the degrees of freedom of the chi-square distribution is set to the number of estimated AR parameters.

The adj is the degrees-of-freedom adjustment (as you can read in the help file for the mq function). In the example, adj=18 because $18=2\times 3^2$ since the model has a trivariate response ($k=3$) and two autoregressive lags ($p=2$).

$\endgroup$
  • $\begingroup$ Thanks Richard. I cannot upvote the answer as I have fewer than 15 reputations. Moreover, I used AIC to fit VAR(2) model but Ljung-Box test gives better results with VAR(3) model. Can we use Ljung-Box statistic to select the order of the model? $\endgroup$ – Mark May 5 '17 at 4:14
  • $\begingroup$ @Mark, it depends on what you want to use the model for. E.g. if you want to do forecasting, then AIC is a sounder basis for model selection than the Lung-Box test (which can lead to overfitting). $\endgroup$ – Richard Hardy May 5 '17 at 5:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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