mardi 6 mars 2018

Different results from forecast::checkresiduals and Box.test

I'm trying to fit an ar modelo with exogenous regressors, in particular seasonal dummies and trend with AR(3) error. For this I'm using the following code:

modelo<-Arima(log.licor, order = c(3,0,0), xreg = tend_esta, include.mean = F)

there is no mean included since I'm not leaving any seasonal dummy out of the regression.

The result of

forecast::checkresiduals(modelo, test = "LB")

is:

    Ljung-Box test
data:  Residuals from Regression with ARIMA(3,0,0) errors
Q* = 77.787, df = 7, p-value = 3.886e-14

Model df: 17.   Total lags used: 24

but the result of

Box.test(residuals(modelo), type = "Ljung-Box")

is

    Box-Ljung test

data:  residuals(modelo)
X-squared = 1.3407, df = 1, p-value = 0.2469

am I doing something wrong with the arguments? the implication of each results are completly different.

Aucun commentaire:

Enregistrer un commentaire