0
$\begingroup$

I have this time series data presented in the R code below, I want to test for the significance of the first and second lag of auto-correlation and partial auto-correlation coefficient.

ts <- ts(c(8.6804442, 7.3541134, 8.5977826, 6.8805464, 5.1814928, 5.3389510, 5.7019002, 9.4947107, 5.6794177, -0.6920303, 2.0628462, 3.2439078, 6.1778068, 10.0745755, 7.2153141, 4.0897299, 4.9992670, 5.7246579, 5.7844691, 6.1298377, 4.5406423, 6.5713964, 5.1842466, 4.5171652, 4.1202459, 3.2100360, 4.6116722, 6.9000000), start = 1995, end = 2022, frequency = 1)

I understand that one can test for the significance of the whole group of lags of auto-correlation  (ACF) and partial auto-correlation coefficient (PACF) as follows:

forecast::ggAcf(ts) + ggplot2::theme_bw()
forecast::ggPacf(ts) + ggplot2::theme_bw()

The reason why I need this is to specifically check if the second lag coefficient of PACF is actually significant because the auto.arima() function of the forecast package suggests that the model is ARIMA(0,0,1) while the interpretation of the ACF and PACF suggests ARIMA(2,0,1)

(ts_mod <- forecast::auto.arima(ts))
#Series: ts 
#ARIMA(0,0,1) with non-zero mean 

#Coefficients:
#         ma1    mean
#      0.8164  5.7382
#s.e.  0.1432  0.5931

#sigma^2 = 3.311:  log likelihood = -56
#AIC=118.01   AICc=119.01   BIC=122.01
$\endgroup$

1 Answer 1

2
$\begingroup$

I believe you can use simple t-tests from the following regressions.

First, to test the $k^{\text{th}}$ ACF value, fit a regression

lm(Y~1+Ylag)

where Ylag is the $k^{\text{th}}$ lag you are interested in testing. Then look at the p-value for the coefficient on Ylag.

Second, to test the $k^{\text{th}}$ PACF value, fit an AR(k) model:

Arima(Y,order=c(k,0,0))

And check the p-value on the coefficient on the $k^{\text{th}}$ lag.

However, I would not use statistical significance to determine variable inclusion. Instead, using AIC or BIC will typically result in a better model. You may want to set the following options in you auto.arima call:

auto.arima(Y,stepwise=FALSE,approximation=FALSE,trace=TRUE)
  • stepwise=FALSE will fit every possible ARIMA model under the default max p, q, and p+q constraints, not taking any shortcuts.
  • approximation=FALSE will use the actual likelihood instead of an approximation to the likelihood when computing AIC or BIC.
  • trace=TRUE will print the model results as it tries each model. It may take up to a few minutes (especially if it is trying seasonal models), so this is helpful as it shows you that the command is actually running and making progress.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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