| WINKS Manual Index | Help | Home | Tutorials |

WINKS Online Manual


Chapter 5 Part 4

Time Series Analysis

The WINKS Times Series module allows you to perform model identification, estimation and forecasting. Data are sometimes observed as a series of numbers over a period of time. Some common series of data include sunspots, airline passengers per month, monthly sales figures, stock prices and the like. 

Description Of The Time Series Process

Time series analysis deals with attempting to model an observed series of datapoints to forecast future activity or to understand the driving  mechanism. There are a number of approaches to modeling.  This time series program bases its modeling techniques on the ARMA (autoregressive moving average) approach.  In this approach, the researcher must first decide if  there is an autoregressive (AR) and/or moving average (MA) component, and  the order of each.  These orders will be called p and q. We will use p as the order of the AR component and q as the order of the MA component. Thus, a model will be designated as an ARMA(p,q).  For example, the model ARMA(8,0) means that the order of the AR component is 8 and the order of the MA component is 0 (none).  The goal is to find a model which adequately describes the process without using any unnecessary parameters, a parsimonious model.

For those with a mathematical bent, the ARMA model can be written mathematically as  follows:

Xt = c Xt-1 + . . . + c Xt-p  + at - d1at-1 - . . . - dqat-q

where p and q are the model orders,

at is a zero-mean, white noise process, whose variance is called the white noise variance (WNV).

c1  to  cp  are the AR parameters

d1  to  dq   are the MA parameters

Xt  is the data at time t

For this process to be stationary the roots of the characteristic equation (1- c1r-...-cprp =0 where r is a complex number) must lie outside the unit circle. See Box, Jenkins and Reinsel (1994) for a detailed  explanation. 
 

How To Analyze Time Series Data

The purpose of the WINKS Time Series program is to help you: 

A) Decide what ARMA model is appropriate for your data

B) Estimate the parameters of the model

C) Create a forecast

A) Decide what ARMA model is appropriate for your data

The first part of the analysis process is model identification. There are no easy answers to how your data should be modeled. Although much research is being conducted to help you identify a model, it still remains somewhat of an art.  Here are a few items that you need to consider in choosing a model.

Is the data simply white noise? That is, do the values of the data go up  and down in a completely random fashion?  One way to determine if the data are white noise is to examine the sample autocorrelations.  If they are small and uncorrelated  then the process may be white noise. If the process is white noise, then only about  5% of the sample autocorrelations (absolute values) would be expected to be greater than 2  / sqrt(n) where n is the length of the series. Thus, for a series of length 100, you would begin to suspect that white noise is NOT a sufficient model if many more than 5 autocorrelations are greater than (2 /10) = 0.2 in absolute value. If the sample autocorrelations are greater than the 5% limits for the first few lags, this indicates that modeling should be continued. 

If the data are not white noise, you may then attempt to model it as an ARMA process. The WINKS program provides a statistic to help you decide what model is appropriate. The W-statistic (see Woodward and Gray) technique examines the data for fit to a series of models, and returns the three "best" guesses for a model. These are not necessarily the best models, but the technique can be helpful in choosing which models to examine. 

There are a number of other techniques to assist you in choosing a model. Box and Jenkins recommend identification of p and q on the basis of examination of the sample autocorrelations and partial autocorrelations. 

It should be noted that special care must be taken into account when some  roots of the characteristic equation are near the nonstationary region.  In  this case the process may need to be transformed to a stationary model before  the stationary components of the model can be seen. Please reference a  standard time series text such as Box, Jenkins and Reinsel (1994) for further advice. 

B) Estimate Parameters

Once a model has been chosen, you may estimate the values of the parameters  of the model given your set of data. The WINKS program uses techniques  developed by Tsay, Tiao and Burg to calculate the estimates of the model. (Tsay and Tiao, 1984)

 C) Forecast

Once you have the estimates of a model, you can use this information to create a forecast. During your process of deciding what model you will use, you may choose to forecast the last few known values of your series  using the model under consideration. If the model estimates these to your  satisfaction, then it may be a good model for forecasting into the future. WINKS will allow you to use your model to forecast future values of the series. An optional 95% confidence bound may be plotted for your estimated forecast. 


The Modeling Process

The time series module allows you to perform some of the most common series  evaluation techniques on a set of data, and will also allow you to estimate the parameters of an ARMA model (AutoRegressive Moving Average). Once a  model is determined, the program allows you to create a forecast.

Use of this module usually takes the following steps:            

Step 1: Open the database named SERJ.

Step 2: From the Analyze menu select the "Time Series" option.

Step 3:  Select Y as the variable to analyze. The Time Series Analysis window will be displayed containing Model, Estimate and Output menus.

Step 4: Examine the plots of the data, autocorrelations and partial autocorrelations. Display plots by selecting the Graph options from the Model menu in the Time Series Analysis Window.  A plot of partial autocorrelations is shown in Figure 1.


Figure 1

Step 5: Display tables of sample autorrelations and partial autocorrelations by selecting these options from the Model menu. (Refer to the tables below.) Notice that the sample autocorrelations are substantial, with the magnitude of many of them greater than the calculated 95% limit (described earlier in this section)

                          2 * ( 1 / 17.20) =  0.12

indicating that the data are not from a white noise process.

Autocorrelations:

Lag   Autocorrelations   Std. Dev =   3.197
---   ----------------    Mean =      53.509
0               1.000
1               0.971
2               0.896
3               0.793                              
4               0.680


5               0.574                              
6               0.485                              
7               0.416                              
      :
     etc
      :
17              0.140                               
18              0.121                               
19              0.110                            
 

Partial Autocorrelations:

 Lag     Partial Autocorr
 ---     ----------------  
   0         0.000   
   1         0.971   
   2        -0.804   
   3         0.188   
   4         0.260   
               :   
              etc  
               :   
  17        -0.003
  18         0.085   
  19         0.017   


Step 6: From the Model menu select "Model Identification/W-Statistic." In addition to the plots of the autocorrelation and partial autocorrelations, you can use the W-statistic to help you choose an appropriate model. That is, decide the values of P and Q for an ARMA model, where P represents the degree of the AR (auto-regressive) part of the model and Q represents the MA (moving average) part of the model.  

You must give the program MAXIMUM values of P and Q to be considered.  In  this case, enter 10, 10. This means that you will consider an ARMA model up to P=10 and Q=10. The displayed results are: 

Top 3 choices for P and Q using the W-statistic: 
Choice  1) P=  3   Q =  2     W - statistic =  0.253 
Choice  2) P= 10   Q =  8     W - statistic =  0.256 
Choice  3) P=  3   Q =  9     W - statistic =  0.420 

The lower the W statistic, the stronger the choice. Thus, from these results, the model 3,2 has the lowest value for W, and is therefore a strong choice.

Note: The W-Statistic technique will assist you in choosing a P and Q for an Autoregressive Moving Average ARMA(P,Q) time series model. This  is only a tool in deciding P and Q, it does not necessarily give the 'best' model.

Step 7: From the Analysis menu, select the "Estimate Parameters" option to estimate model parameters. In this case use p = 3, q = 2. The results are:

Estimated AR Parameters:                           

 1 )  2.216831                          
 2 ) -1.770174  
 3 )  .5256025                                     

Estimated MA Parameters:                           

 1 )  .095701
 2 ) -.2602345  

These parameter estimates may then be used to forecast new values. 

Step 7: From the Analysis menu, select "Forecast Beyond Series." For this example, select 20 steps to forecast. The forecast values will be displayed. A partial list of the output is shown below. This table contains the lower and upper 95% confidence values as well as the forecast and the actual series.

   COUNT       LOWER       UPPER      FORECAST     SERIES
      1         53.8        53.8        53.8        53.8
      2         53.6        53.6        53.6        53.6
              ... etc ...
    296         57.0        57.0        57.0
    297      56.1393     57.4385     56.7889
    298      55.1388     58.1855     56.6622
    299      54.0181      58.896     56.4571
    300      52.9685     59.4376      56.203
    301      52.1707     59.8431     56.0069
    302      51.4553      59.941     55.6982
    303      50.9623     59.9519     55.4571
    304       50.671     59.9574     55.3142
    305      50.4607      59.923     55.1919
    306      50.2187     59.7934      55.006
    307      49.9435     59.5997     54.7716
    308      49.5905     59.3138     54.4522
    309      49.3191     59.1023     54.2107
    310       49.038     58.8759     53.9569


    311      48.8671     58.7538     53.8105
    312      48.8726     58.8012     53.8369
    313      48.7651     58.7281     53.7466
    314      48.5294     58.5194     53.5244
    315      48.3593     58.3702     53.3648
    316      48.1499     58.1766     53.1633



Step 8: From the Analysis menu, select "Display Graph of Forecast". A plot of the forecasts with 95% confidence limits will be displayed. See figure 2.

Note: You might try the other two recommendations from the W-Statistic to see if they produce a better forecast. Not all models suggested by the W-statistic will be well-behaved stationary models and thus these forecasts may be poor. As mentioned earlier, there is no guaranteed "best" solution for modeling a process.  You must try several models until you find one that (hopefully) fits the data.  

Note: The W-statistic will never select a strictly moving average model (i.e., p = 0.) For discussion of identification in this case see Box, Jenkins and Reinsel. Also, the W-statistic is appropriate for model identification for stationary models. When data are non-stationary or nearly non-stationary, differencing or other transformations to stationarity may be required.


Figure 2 

Notes on Time Series Analysis

Other Time Series Analysis procedures or options that have not been described above are discussed here:

Output Options

The Time Series Analysis procedures display both textual and graphical output. Textual output is displayed on the screen, and is automatically stored in the output buffer file. When you exit the Time Series Analysis, all of the textual output that appeared during the analysis will be displayed in the WINKS viewer -- the same as output from any other analysis. Also, you can display the output at any time by selecting the "View Text Buffer Contents" from the Output menu.

When graphical output is displayed, you can choose to print, save, or capture the image the same as in other WINKS graphical displays. The options button on the graphical display allows you to modify titles for the graph, and select other options.

Differencing the series

When a series is not stationary, you can sometimes produce a stationary process by differencing the series. A new series is created from the old by subtracting the observation d time units from the original value. (i.e., you create Dt given by Dt = Xt - X t-d) For example, a difference using d=1 creates a new series that consists of the difference between each value in the series minus the previous value. This option allows you to choose the difference order, d. You may also choose to save the differenced series in an ASCII file that could later be imported into a database using the WINKS ASCII import option.

After differencing, the new series (containing fewer points according to the amount of differencing)  can be used for analysis. Note that differencing DOES NOT change the original data in the database. For more information on when to difference a series, refer to a text such as Box, Jenkins and Reinsel (1994).

 
Output Forecast Information to a File

You can use the "Output Forecast information to a file" option from the Estimate menu to save the  forecast information to a comma delimited ASCII file, that could then be imported into a dBase file for further analysis using the WINKS ASCII import option. 


 
Continue to Chapter 5 Part 5. (Quality Control)

     


| Previous Section | Next Chapter | WINKS Manual Index | Help | Home | Tutorials |