ST007
Basic Usage of SAS/ETS® Software to Forecast a Time Series
by LTC Douglas L. McAllasterUS Army Logistics Management College, Fort Lee, Virginia
ABSTRACTThis paper is a tutorial on using SAS/ETS to forecast atimes series. We explain how PROC FORECASTgenerates forecasts using the three main exponentialsmoothing methods (single, Holt's, & Winters') and thestepwise auto-regressive method. Next, we explain usageof PROC REG (or better, PROC AUTOREG) to forecasta seasonal times series using indicator variables. Finally,we briefly overview of the capabilities and complicationsof using PROC ARIMA.INTRODUCTIONForecasting a times series is the process of projecting atime series into the future. We can forecast two ways:either with extrapolation methods or with explanatorymodels. Extrapolation methods are adaptive techniqueswhich simply project the series by responsively smoothingrecently observed data. On the other hand, explanatorymodels attempt to fit the observed data to somemathematical model or underlying process.EDAExploratory data analysis (EDA) is the first and necessarystep for proper time series analysis. We look at a timesseries plot of the data to visually identify the presence of three possible components: level, trend, and seasonality.First, the plot may be flat, showing only randomfluctuation about some constant LEVEL. Second, the plotmay show an upward (or downward) TREND over time.Finally, the plot may show some obviousSEASONALITY. The various time series plots in theappendix display these components.EXPONENTIAL SMOOTHING IDEASExponential smoothing is the easiest and (thus?) the mostwidely used extrapolation method. The basic idea of thismethod is to project a series based mostly on recent data,i.e., without much regard to older data. We could call thisa "short memory" method. This makes good commonsense: we believe that sales next year depends much moreon sales last year than on the sales from ten or even fiveyears ago.Another idea inherent in exponential smoothing is that aforecast for next period should be based on the accuracyof the most recent forecast. That is, if our most recentforecast was too high, we adjust the next forecastdownward. Likewise, if our most recent forecast was toolow, we adjust the next forecast upwards. Thus, wedescribe smoothing methods as self-correcting, adaptive,and responsive; or, as we in the military like to say, a "fire& forget" weapon system. The appendix has plotsshowing the responsiveness of exponential smoothingtechniques vice the fixed line created by using aregression method.Furthermore, the short memory of exponential smoothingmakes it a particularly appropriate method when the timeseries components (level, trend, & seasonality) arechanging over time. Finally, the adaptive feature of smoothing methods is especially useful since an analystoften must forecast many dozens or hundreds of stock keeping units (SKUs) and does not want to manuallydetermine changes in direction or tailor a separate modelfor each SKU. Of course, the SAS System has BYvariable processing which makes for very simple coding,indeed.PROC FORECASTThere are three main exponential smoothing methods:single, Holt's, & Winters'. We choose the appropriatemethod according to the components we identified duringthe EDA phase. That is, we use single exponentialsmoothing for a series which has only the levelcomponent, Holt's exponential smoothing method for aseries which also has a trend component, and Winters'exponential smoothing method for a series which also hasa seasonal component.SESSingle exponential smoothing is (SES) the simplest of thethree main exponential smoothing methods, so we beginour explanation here. A perusal of the SES equation inthe appendix shows the above mentioned self-correctivenature of the method. (The second equation is moreconvenient for spreadsheet implementation.) Byconvention, Yt is the series value and Ft is a forecastvalue. The alpha factor smooths the level component of the series, i.e, smooths out the past forecast errors. Wecall alpha a "smoothing or dampening factor" rather than aparameter since, in this context, we are not fitting anexplanatory model to the data. Rather, we are simplyextrapolating the series, not trying to determine a formal
Statistics, Data Analysis & EconometricsNESUG 16