Chapter Contents |
Previous |
Next |
Choosing the Best Forecasting Model |
The Time Series Viewer is a graphical tool for viewing and analyzing time series. It can be used separately from the Time Series Forecasting System using the TSVIEW command or by selecting Time Series Viewer from the Analysis pull-down menu under Solutions.
In this chapter you will use the Time Series Viewer to examine plots of your series before fitting models. Begin this example by invoking the forecasting system and selecting the View Series Graphically button, as shown in Display 26.1, or the View Series tool bar icon.
Display 26.1: Invoking the Time Series Viewer
From the Series Selection window, select SASHELP as the library, WORKERS as the data set, and MASONRY as the time series, then click the Graph button. The Time Series Viewer displays a plot of the series, as shown in Display 26.2.
Display 26.2: Series Plot
Select the Zoom In icon, the first one on the window's horizontal tool bar. Notice that the mouse cursor changes shape and that "Note: Click on a corner of the region, then drag to the other corner" appears on the message line. Outline an area, as shown in Display 26.3, by clicking the mouse at the upper left corner, holding the button down, dragging to the lower right corner, and releasing the button.
Display 26.3: Selecting an Area for Zoom
The zoomed plot should appear as shown in Display 26.4.
Display 26.4: Zoomed Plot
You can repeat the process to zoom in still further. To return to the previous view, select the Zoom Out icon, the second icon on the window's horizontal tool bar.
The third icon on the horizontal tool bar is used to link or unlink the viewer window. By default, the viewer is linked, meaning that it is automatically updated to reflect selection of a different time series. To see this, return to the Series Selection window by clicking on it or using the window pull-down menu or Next Viewer tool bar icon. Select the Electric series in the Time Series Variables list box. Notice that the Time Series Viewer window is updated to show a plot of the ELECTRIC series. Select the Link/unlink icon if you prefer to unlink the viewer so that it is not automatically updated in this way. Successive selections toggle between the linked and unlinked state. A note on the message line informs you of the state of the Time Series Viewer window.
When a Time Series Viewer window is linked, selecting View Series again will make the linked Viewer window active. When no Time Series Viewer window is linked, selecting View Series brings up an additional Time Series Viewer window. You can bring up as many Time Series Viewer windows as you want.
Having seen the plot in Display 26.2, you might suspect that the series is nonstationary and seasonal. You can gain further insight into this by examining the sample autocorrelation function (ACF), partial autocorrelation function (PACF), and inverse autocorrelation function (IACF) plots. To switch the display to the autocorrelation plots, select the second icon from the top on the vertical tool bar at the right side of the Time Series Viewer. The plot appears as shown in Display 26.5.
Display 26.5: Sample Autocorrelation Plots
Each bar represents the value of the correlation coefficient at the given lag. The overlaid lines represent confidence limits computed at plus and minus two standard errors. You can switch the graphs to show significance probabilities by selecting Correlation Probabilities under the Options pull-down menu, or the Toggle ACF Probabilities tool bar icon.
The slow decline of the ACF suggests that first differencing may be warranted. To see the effect of first differencing, select the simple difference icon, the fifth icon from the left on the window's horizontal tool bar. The plot now appears as shown in Display 26.6.
Display 26.6: ACF Plots with First Difference Applied
Since the ACF still displays slow decline at seasonal lags, seasonal differencing is appropriate (in addition to the first differencing already applied). Select the Seasonal Difference icon, the sixth icon from the left on the horizontal tool bar. The plot now appears as shown in Display 26.7.
Display 26.7: ACF Plot with Simple and Seasonal Differencing
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.