* * Example 9.3.1 from page 327 * open data deaths.tsm calendar(m) 1973 data(format=free,org=columns) 1973:1 1978:12 deaths * * The ESMOOTH instruction allows you to select from among three models for the * trend (none, linear and exponential) and three for the seasonal (none, additive * and multiplicative). The automatic selection procedure optimizes the * coefficients in each and picks the model with the smallest BIC (here labeled as * SBC - Schwarz Bayesian Criterion). The CONSTRAIN option forces the coefficients * into the range [0,1]. (Values outside that can still create stable models). * Note that RATS uses different Greek letters for the trend and seasonal * smoothing parameters: gamma for trend (rather than beta) and delta for seasonal * (rather than gamma). * esmooth(trend=select,seasonal=select,constrain,initial=start,forecasts=forecast,steps=24) deaths * * The Holt-Winters seasonal model used in example 9.3.1 is the combination of * TREND=LINEAR and SEASONAL=ADDITIVE. * esmooth(trend=linear,seasonal=additive,constrain,initial=start,forecasts=forecast,steps=24) deaths * * Graph the actual data and the forecasts * graph 2 # deaths # forecast * * Pull in the extra data for comparison * data(unit=input) 1979:1 1979:6 adeaths 7798 7406 8363 8460 9217 9316 @uforeerrors adeaths forecast 1979:1 1979:6 print(picture="*.") 1979:1 1979:6 adeaths forecast