For the BIC and AIC, you can simply use AIC function as follow:
> model <- arima(x=sunspots, order=c(2,0,2), method="ML")
> AIC(model)
[1] 23563.39
> bic=AIC(model,k = log(length(sunspots)))
> bic
[1] 23599.05
The function AIC can provide both AIC and BIC. Look at ?AIC
.
auto.arima
uses some approximations in order to speed up the processing. The final model is fitted using full MLE, but along the way the models are estimated using CSS unless you use the argument approximation=FALSE
. This is explained in the help file:
approximation If TRUE
, estimation is via conditional sums of squares
and the information criteria used for model selection are approximated.
The final model is still computed using maximum likelihood estimation.
Approximation should be used for long time series or a high seasonal
period to avoid excessive computation times.
The default setting is approximation=(length(x)>100 | frequency(x)>12)
, again this is specified in the help file. As you have 17544 observations, the default setting gives approximation=TRUE
.
Using the approximations, the best model found was a regression with ARIMA(5,1,0) errors with AICc of 2989.33. If you turn the approximations off, the best model has ARIMA(2,1,1) errors with an AICc of 2361.40.
> fitauto = auto.arima(reprots[,"lnwocone"], approximation=FALSE,
xreg=cbind(fourier(reprots[,"lnwocone"], K=11),
reprots[,c("temp","sqt","humidity","windspeed","mist","rain")]),
start.p=1, start.q=1, trace=TRUE, seasonal=FALSE)
> fitauto
Series: reprots[, "lnwocone"]
ARIMA(2,1,1) with drift
...
sigma^2 estimated as 0.08012: log likelihood=-1147.63
AIC=2361.27 AICc=2361.4 BIC=2617.76
Best Answer
The forecast package does forecasting. For that purpose, the significance of variables is irrelevant. What matters is whether a variable is useful for forecasting. The AIC is a good guide for selecting variables for forecasting, so the package minimizes the AIC. If you really want to do a significance test on a variable, just compute the t-statistics from the output.
In the example provided, the t-statistic for income is 0.2028/0.0461 = 4.4. The p-value is
2*(1-pt(0.2028/0.0461, NROW(fpp2::uschange)-5)) = 1.8e-5