Keyword GRID (EXSMOOTH command)
The keyword GRID
specifies a range of values to use for the associated smoothing
parameter. When GRID
is specified,
new variables are saved only for the optimal set of parameters on
the grid.
- The first value on
GRID
specifies the start value, the second value is the end value, and the last value is the increment. - The start, end, and increment values on
GRID
are separated by commas or spaces and enclosed in parentheses. - If you specify any grid values, you must specify all three.
- If no values are specified on
GRID
, the default values are used. - Grid start and end values for alpha, gamma, and delta can range from 0 to 1. The defaults are 0 for the start value and 1 for the end value.
- Grid start and end values for phi can range from 0 to 1, exclusive. The defaults are 0.1 for the start value and 0.9 for the end value.
- Grid increment values must be within the range specified by start and end values. The default is 0.1 for alpha, and 0.2 for gamma, delta, and phi.
Example
EXSMOOTH VAR1
/MODEL=LA
/PERIOD=12
/GAMMA=0.20
/DELTA=0.20.
- This example uses a model with a linear trend and additive seasonality.
- The parameters and values are alpha = 0.10, gamma = 0.20, and delta = 0.20. Alpha is not specified but is always used by default.
- This command generates one FIT variable and one ERR variable to contain the forecasts and residuals generated by this one set of parameters.
Example
EXSMOOTH VAR2
/MODEL=EA
/ALPHA=GRID
/DELTA=GRID(0.2,0.6,0.2).
- This example specifies a model with an exponential trend component and an additive seasonal component.
- The default start, end, and increment values (0, 1, and 0.1) are used for the grid search of alpha. Thus, the values used for alpha are 0, 0.1, 0.2, 0.3, ..., 0.9, and 1.
- The grid specification for delta indicates a start value of 0.2, an end value of 0.6, and an increment of 0.2. Thus, the values used for delta are 0.2, 0.4, and 0.6.
- Since this is an exponential trend model, the parameter
gamma will be supplied by
EXSMOOTH
with the default value of 0.1, even though it is not specified on the command. - Two variables (FIT and ERR) will be generated for the parameters resulting in the best-fitting model.