Im a novice in time series and currently experimenting abit with time series forecasting.
I have gathered monthly unemployment data for 23 years for a country, and want to do some forecasting. From what I have gathered, seasonal ARIMA models do work pretty good modelling this.
First off I plotted the time series to get a general grasp of the data.
log transforming to minimize the variance, differencing-12 to get rid of the seasonality gives
which is not stationary. Applying first difference improves the ACF slightly.
I instead turned to auto.arima.
arima_unemp<- auto.arima(log(unemp),test="adf", stepwise= FALSE, approximation = FALSE, seasonal = TRUE) Series: log(unemp) ARIMA(2,0,2)(0,1,0) with drift Coefficients: ar1 ar2 ma1 ma2 drift 1.9175 -0.9330 -0.3739 -0.1529 -0.0023 s.e. 0.0261 0.0257 0.0673 0.0621 0.0012 sigma^2 estimated as 5.629e-05: log likelihood=917.29 AIC=-1822.58 AICc=-1822.25 BIC=-1801.12 Training set error measures: ME RMSE MAE MPE MAPE Training set 8.267457e-05 0.007267726 0.004958866 0.00530713 0.2478116 MASE ACF1 Training set 0.07556666 0.004700562
when checking the residuals
checkresiduals(arima_unemp) Ljung-Box test data: Residuals from ARIMA(2,0,2)(0,1,0) with drift Q* = 34.397, df = 19, p-value = 0.01649 Model df: 5. Total lags used: 24
As seen, the model does not pass the portmaneu test, and the residuals are therefore correlated.
The book im following does not discuss what happens if the residual diagnostics is insufficient, just that it's important to check that
- Residuals are uncorrelated
2.Residuals have mean 0
Is this assessment correct? can something be done here or is seasonal arima simply out of the question? What would be my next step?
Can provide data if someone is interested.
The ADF test now says the data is stationary. Checking the ACF I still see a slow decay, so I decided to apply first-difference again.
the ACF now looks alot better. Using auto.arima I now get
Series: diff(unemp2, 1) ARIMA(2,0,2) with zero mean Coefficients: ar1 ar2 ma1 ma2 1.0742 -0.7194 -1.3213 0.8654 s.e. 0.0996 0.0959 0.0677 0.0831 sigma^2 estimated as 1.408e-06: log likelihood=1394.93 AIC=-2779.86 AICc=-2779.63 BIC=-2762.02 Training set error measures: ME RMSE MAE MPE MAPE Training set -1.991158e-06 0.00117744 0.0008238097 -261.1788 538.8284 MASE ACF1 Training set 0.6163598 -0.0358442
with residual diagnostics
The residuals from this model do show stationarity. The histogram and a qq plot does however show that the residuals are not normally distributed.
Is my residual diagnostics sufficient enough to continue with forecasting, or can I somehow improve the model? Is it okay applying first-difference twice?