* * Example 9.2.1 from page 324 * open data deaths.tsm calendar(m) 1973 data(format=free,org=columns) 1973:1 1978:12 deaths * * The Holt-Winters (non-seasonal) model is done with the ESMOOTH instruction with * the option TREND=LINEAR. (TREND=NONE will do a simple "local level" exponential * smoothing). The other options here request * (a) estimation with the parameters restricted to the range [0,1] * (the default will allow them to stray outside of that, as the recursions * are stable for, for instance, alpha values up to 2.0). * (b) initialization of the recursions based upon the just the values * at the start of the data set (the default uses the full data set). * * The FORECASTS and STEPS options put 24 steps of out-of-sample forecasts into * the series FORECAST. * esmooth(trend=linear,constrain,init=start,forecasts=forecast,steps=24) deaths * graph(footer="Figure 9-2 Deaths data with predictions of non-seasonal HW") 2 # deaths # forecast * * Bring in the extra data to compare with the forecasts * data(unit=input) 1979:1 1979:6 adeaths 7798 7406 8363 8460 9217 9316 * * Compute statistics on forecast errors and display the forecasts * and actual data. * @uforeerrors(title="Holt-Winters Forecasts") adeaths forecast 1979:1 1979:6 print(picture="*.") 1979:1 1979:6 adeaths forecast