Time Series Model Package
ESMSPEC Methods
ESMSPEC.Close Method
rc=obj.Close ();
Finalizes the ESMSPEC object to prepare the ESM model to be used in a TSM object or to be imported to a TSMSPEC object for printing or for storage in a model repository catalog.
Arguments
There are no arguments associated with this method.
ESMSPEC.GetLabel Method
rc=obj.GetLabel ();
Retrieves the label of the specified ESM model and stores it in the return variable, rc.
Arguments
There are no arguments associated with this method.
ESMSPEC.Open Method
rc=obj.Open ();
Opens the ESMSPEC object.
Arguments
There are no arguments associated with this method.
ESMSPEC.SetOption Method
rc=obj.SetOption ('Name', Value <, 'Name', Value, …>);
Specifies ESM options.
Input Arguments
You must specify at least one of the following 'Names' and its associated Value:
- 'CRITERION'
takes a string Value that specifies the model selection criterion (statistic of fit) to be used to select from several candidate models. For a list of valid values, see the CRITERION= option in the HPFDIAGNOSE procedure in SAS Forecast Server Procedures: User's Guide. The default is RMSE.
- 'METHOD'
-
takes a string Value that specifies the ESM method. You can specify the following values:
- ADDWINTERS
requests the Winters additive method.
- BEST
uses seasonal properties of the data to choose between the BESTN and BESTS methods. If the data consist of a single seasonal cycle, the BESTN method is used. Otherwise, a seasonality test is performed on both the original data and the original data after one nonseasonal difference is taken. If seasonality is present in either the original or differenced series, the series is considered to be seasonal. If the data are seasonal, the BESTS method is used. If neither seasonality test indicates seasonality, the BESTN method is used. The results of the seasonality test are summarized in Table 7. The significance level for the seasonality test is 0.05. For more information about the seasonality test, see the SEASONTEST function of the time series analysis (TSA) package.
- BESTN
requests the best candidate nonseasonal smoothing model among the SIMPLE, LINEAR, and DAMPTREND methods.
- BESTS
requests the best candidate seasonal smoothing model among the SEASONAL, ADDWINTERS, and WINTERS methods.
- DAMPTREND
requests damped trend exponential smoothing.
- DOUBLE
requests second order exponential smoothing.
- LINEAR
requests linear (Holt) exponential smoothing.
- MULTSEASONAL
requests multiplicative seasonal exponential smoothing.
- SEASONAL
requests additive seasonal exponential smoothing.
- SIMPLE
requests simple (single) exponential smoothing.
- WINTERS
requests the Winters multiplicative method.
By default, METHOD=BEST.
- 'NOSTABLE'
takes a Boolean Value (0 or 1) that, when set to 1, requests that the smoothing model parameter estimates not be restricted to the additive invertible region of the parameter space. The default is 0 (parameter estimates are restricted).
- 'NOEST'
takes a Boolean Value that indicates whether the smoothing model parameters are fixed values. By default, the smoothing model parameters are optimized. 'NOEST' requires all of the exponential smoothing model parameters to be explicitly specified via calls to the ESMSPEC.SetParm method. This argument is ignored if any of the model parameters is not specified.
Table 7: Results of BEST Method of the ESMSPEC.SetOption Method
ESMSPEC.SetParm Method
rc=obj.SetParm ('CompName', Parm, <LRest,URest>);
Specifies parameter values and restrictions for the specified ESM component. Optional bounds, LRest and URest, can be specified to restrict the weight value for the specified ESM component during parameter optimization. Parameter values and restrictions must be in the range from –1 to 2.
Input Arguments
You must specify the following input arguments:
- 'CompName'
-
specifies a character variable that indicates the ESM component context. You can specify the following values:
- DAMP
specifies that Parm is the initial value of a damping weight parameter.
- LEVEL
specifies that Parm is the initial value of a level weight parameter.
- SEASON
specifies that Parm is the initial value of a season weight parameter.
- TREND
specifies that Parm is the initial value of a trend weight parameter.
- Parm
takes a numeric value that specifies the initial value of the smoothing component weight. The default value is a missing value, which causes the optimizer to use a grid search to find an appropriate initial value.
You can also specify the following input arguments:
- LRest
is a numeric variable that specifies a lower bound on the smoothing weight. The default value of the level, season, and trend weight parameters is 0.001. The default value of the damping weight parameter is 0.8.
- URest
is a numeric variable that specifies an upper bound on the smoothing weight. The default value is 0.999 for all smoothing weights.
ESMSPEC.SetTransform Method
rc=obj.SetTransform ('Type' <,'Option',Parm>);
Specifies the functional transform, 'Type', to be used by the ESM model. Optional arguments Option and Parm offer greater control over the transform.
Input Arguments
You must specify the following input argument:
- 'Type'
-
takes one of the following string values:
- AUTO
automatically chooses between NONE and LOG based on model selection criteria.
- BOXCOX
requests Box-Cox transformation. You can specify the control parameter for the transformation by using the optional Parm argument, whose value must be between –5 and 5. The default value of Parm is 1.
- LOG
requests logarithmic transformation.
- LOGIT | LOGISTIC
requests logistic transformation.
- NONE
does not apply a transformation.
- SQRT
requests square-root transformation.
The default is NONE.
You can also specify the following input arguments:
- 'Option'
-
takes one of the following string values that specifies prediction semantics for the inverse transform:
- MEAN
requests that the inverse transform produce mean forecasts.
- MEDIAN
requests that the inverse transform produce median forecasts.
The default is MEAN.
- Parm
takes a numeric value between –5 and 5 that specifies a control parameter. This parameter is allowed only for Box-Cox transformations. The default is 1.