Next Page Previous Page Home Tools & Aids Search Handbook
6. Process or Product Monitoring and Control
6.4. Introduction to Time Series Analysis
6.4.4. Univariate Time Series Models

6.4.4.10.

Box-Jenkins Analysis on Seasonal Data

Example with the SEMPLOT Software for a Seasonal Time Series A computer software package is needed to do a Box-Jenkins time series analysis for seasonal data. The computer output on this page will illustrate sample output from a Box-Jenkins analysis using the SEMSTAT statisical software program. It analyzes the series G data set in the Box, Jenkins and Reinsel text.

The graph of the data and the resulting forecasts after fitting a model are portrayed below.

Model Identification Section Enter FILESPEC or EXTENSION (1-3 letters):
To quit, press F10.
    ? bookg.bj 

    Plot of raw data

    MAX  MIN  MEAN  VARIANCE  NO. DATA 
    622.0000  104.0000  280.2986  14391.9170  144 
    Do you wish to make transformations? y/n  y 
    The following transformations are available:
       
      1 Square root  2 Cube root 
      3 Natural log  4 Natural log log 
      5 Common log  6 Exponentiation 
      7 Reciprocal  8 Square root of Reciprocal 
      9 Normalizing (X-Xbar)/Standard deviation 
      10 Coding (X-Constant 1)/Constant 2 
    Enter your selection, by number: 
    Statistics of Transformed series: 
    Mean:     5.542  Variance     0.195 
    Input order of difference or 0: 
    Input period of seasonality (2-12) or 0:  12 
    Input order of seasonal difference or 0: 
    Statistics of Differenced series: 
    Mean:     0.009  Variance     0.011 
    Time Series: bookg.bj. 
    Regular difference: 1  Seasonal Difference: 0 

    Autocorrelation Function for the first 36 lags 

     1   0.19975     13   0.21509      25   0.19726
     2  -0.12010     14  -0.13955      26  -0.12388
     3  -0.15077     15  -0.11600      27  -0.10270
     4  -0.32207     16  -0.27894      28  -0.21099
     5  -0.08397     17  -0.05171      29  -0.06536
     6   0.02578     18   0.01246      30   0.01573
     7  -0.11096     19  -0.11436      31  -0.11537
     8  -0.33672     20  -0.33717      32  -0.28926
     9  -0.11559     21  -0.10739      33  -0.12688
    10  -0.10927     22  -0.07521      34  -0.04071
    11   0.20585     23   0.19948      35   0.14741
    12   0.84143     24   0.73692      36   0.65744
       
    Autocorrelation plot of the raw data
Analyzing Autocorrelation Plot for Seasonality If you observe very large autocorrelations at lags spaced n periods apart, for example at lags 12 and 24, then there is evidence of periodicity. That effect should be removed, since the objective of the identification stage is to reduce the autocorrelations throughout. So if simple differencing was not enough, try seasonal differencing at a selected period. In the above case, the period is 12. It could, of course, be any value, such as 4 or 6.

The number of seasonal terms is rarely more than 1. If you know the shape of your forecast function, or you wish to assign a particular shape to the forecast function, you can select the appropriate number of terms for seasonal AR or seasonal MA models.

The book by Box and Jenkins, Time Series Analysis Forecasting and Control (the later edition is Box, Jenkins and Reinsel, 1994) has a discussion on these forecast functions on pages 326 - 328. Again, if you have only a faint notion, but you do know that there was a trend upwards before differencing, pick a seasonal MA term and see what comes out in the diagnostics.

The results after taking a seasonal difference look good!

Autocorrelation plot after taking seasonal difference
Model Fitting Section Now we can proceed to the estimation, diagnostics and forecasting routines. The following program is again executed from a menu and issues the following flow of output:

Enter FILESPEC or EXTENSION (1-3 letters):
To quit press F10. 

    ? bookg.bj 
    MAX  MIN  MEAN  VARIANCE  NO. DATA 
    622.0000  104.0000  280.2986  14391.9170  144 
    Do you wish to make transformations? y/ y (we selected a square root transformation because a closer inspection of the plot revealed increasing variances over time) 
    Statistics of Transformed series: 
    Mean:     5.542  Variance     0.195 
    Input order of difference or 0: 
    Input NUMBER of AR terms:     Blank defaults to 0 
    Input NUMBER of MA terms: 
    Input period of seasonality (2-12) or 0:  12 
    Input order of seasonal difference or 0: 
    Input NUMBER of seasonal AR terms:     Blank defaults to 0 
    Input NUMBER of seasonal MA terms: 
    Statistics of Differenced series: 
    Mean:     0.000  Variance     0.002 
    Pass 1 SS:  0.1894 
    Pass 2 SS:  0.1821 
    Pass 3 SS:  0.1819 

    Estimation is finished after 3 Marquardt iterations. 

Output Section
    MA estimates with Standard Errors
    Theta 1 :    0.3765    0.0811 

    Seasonal MA estimates with Standard Errors
    Theta 1 :    0.5677    0.0775 

    Original Variance            :             0.0021
    Residual Variance   (MSE)    :      0.0014 
    Coefficient of Determination :     33.9383 

    AIC criteria ln(SSE)+2k/n    :      -1.4959 
    BIC criteria ln(SSE)+ln(n)k/n:     -1.1865 

    k = p + q + P + Q + d + sD = number of estimates + order of regular difference + product of period of seasonality and seasonal difference. 

    n is the total number of observations.
    In this problem k and n are:  15   144

    ***** Test on randomness of Residuals *****
    The Box-Ljung  value      =   28.4219
    The Box-Pierce value      =   24.0967
    with degrees of freedom  =   30 
    The 95th percentile           =   43.76809 

    Hypothesis of randomness accepted. 

Forecasting Section
    Defaults are obtained by pressing the enter key, without input.
    Default for number of periods ahead from last period = 6.
    Default for the confidence band around the forecast = 90%.
    Next Period  Lower  Forecast  Upper 
    145  423.4257  450.1975  478.6620 
    146  382.9274  411.6180  442.4583 
    147  407.2839  441.9742  479.6191 
    148  437.8781  479.2293  524.4855 
    149  444.3902  490.1471  540.6153 
    150  491.0981  545.5740  606.0927 
    151  583.6627  652.7856  730.0948 
    152  553.5620  623.0632  701.2905 
    153  458.0291  518.6510  587.2965 
    154  417.4242  475.3956  541.4181 
    155  350.7556  401.6725  459.9805 
    156  382.3264  440.1473  506.7128 
    Plot of forecasted values
Home Tools & Aids Search Handbook Previous Page Next Page