Time Series Model Package
TSM Object
The TSM object generates forecasts of univariate time series.
Table 3 lists the time series model families that are supported.
Table 3: Model Families for the TSM Object
| Family | Object | Description |
|---|---|---|
| ARIMA | ARIMASPEC | ARIMAX models |
| ESM | ESMSPEC | Exponential smoothing models |
| EXM | EXMSPEC | External model (external forecast) |
| IDM | IDMSPEC | Intermittent demand models (Croston’s/average demand (ADEM)) |
| RNN | RNNSPEC | Recurrent neural network models |
| UCM | UCMSPEC | Unobserved component models |
Table 4 summarizes the methods that are associated with the TSM object.
Table 4: Methods of the TSM Object
| Method | Description |
|---|---|
| AddX | Add an independent time series array (XSeries) for the TSM object |
| AddExternal | Add external forecast component series for the TSM object |
| criterion | Return the final fit statistic over a specified forecast region |
| GetForecast | Get the forecast series |
| Initialize | Initialize the TSM object |
| nfor | Return the forecast series length |
| Replay | Replay the restored model and parameter estimates |
| Run | Run the TSM object |
| SetOption | Specify the named option for the TSM object |
| SetY | Specify the dependent time series array (YSeries) for the TSM object |
The basic execution pattern for using a TSM object follows this sequence of operations:
Declare: The object declaration statement creates a new TSM object.
Initialize: The TSM.Initialize method takes a model specification object as its argument and initializes the TSM object for that specified time series model. If no model specification object is provided, the TSM object is initialized as an exponential smoothing method (ESM) that uses the best suited exponential smoothing model. This is equivalent to initializing the TSM object with an ESMSPEC object that has default option values.
SetY: The TSM.SetY method defines the dependent time series for the TSM object.
AddX: The TSM.AddX method defines any independent time series for the TSM object. Each call defines one predictor series. Repeat as needed for each predictor series.
SetOption: The TSM.SetOption method specifies any options that affect the running of the model. Each call defines an option. Repeat as needed to specify all options that are required.
Run: The TSM.Run method uses its currently configured X and Y time series data to execute the time series model that is defined by the TSM object’s model specification. At completion, the model has estimated the parameters and produced a final forecast based on these parameters.