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.

enter image description here

log transforming to minimize the variance, differencing-12 to get rid of the seasonality gives

log transform

with ACF/PACFenter image description here

enter image description here

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)[12] with drift 

         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

Ljung-Box test

data:  Residuals from ARIMA(2,0,2)(0,1,0)[12] with drift
Q* = 34.397, df = 19, p-value = 0.01649

Model df: 5.   Total lags used: 24

enter image description here

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

  1. Residuals are uncorrelated

2.Residuals have mean 0


  1. constant variance

  2. normally distributed.

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.


After some further reading I decided to try the Box cox transformation of the data. After differencing for seasonality and another first-difference I get: enter image description here

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.

enter image description here

the ACF now looks alot better. Using auto.arima I now get

Series: diff(unemp2, 1) 
ARIMA(2,0,2) with zero mean 

         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

enter image description here

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?


1 Answer 1


From looking at your data, it appears as though the time series exhibits significant volatility from day to day as well as general seasonality over time.

To confirm if this is the case, I would recommend decomposing your data and examining components separately to confirm this.


If it appears as though your data is highly volatile, then your analysis may be best served through running an ARCH/GARCH model specifically designed to handle such volatility.

If you wanted to use a machine learning model to attempt to model such volatility, this is also an option.

You might find the following resources of use:

  • $\begingroup$ What kind of a machine learning model would be an option to model such volatility? Thanks! $\endgroup$
    – Cm7F7Bb
    Sep 28, 2022 at 8:50

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.