Overview (TSAPPLY command)
The TSAPPLY
procedure loads existing time series models from an external file
and applies them to data. Models are generated by using the TSMODEL
procedure. You can use TSAPPLY
to obtain forecasts for series for
which new or revised data are available.
Options
Models. By default, parameter estimates saved in the model file are used to produce forecasts. Optionally, model parameters can be reestimated. Reestimation of model parameters has no effect on the model structure. For example, an ARIMA(1,0,1) model will remain so, but the autoregressive and moving-average parameters will be reestimated by using the data in the active dataset. Outliers, if any, are always taken from the model file.
Output.
TSAPPLY
offers
the same output as the TSMODEL
procedure. However, autocorrelations and partial autocorrelations
are available only if model parameters are reestimated.
Saved Variables. You can save forecasts and their confidence intervals to the active dataset. Fit values and noise residuals are available if model parameters are reestimated.
Missing Values. You can control whether user-missing values are treated as valid or invalid values.
Basic Specification
- The basic specification is a
MODEL
subcommand that specifies a model file. By default, all models in the file are loaded. - Default output includes a summary of the distribution of goodness of fit across loaded models and a table of stationary R-square, Ljung-Box Q, and number of outliers by model.
Syntax Rules
- The following subcommands are global:
MODELSUMMARY
,MODELSTATISTICS
,MODELDETAILS
,SERIESPLOT
,OUTPUTFILTER
,SAVE
,AUXILIARY
, andMISSING
. - Each global subcommand is optional, may be
used only once, and must appear before any
MODEL
subcommand. - The
MODEL
subcommand must be used at least once. - An error occurs if a keyword or attribute is specified more than once within a subcommand.
- All subcommands
other than
MODEL
are optional. - Subcommand names and keywords must be spelled in full.
- Equals signs (=) that are shown in the syntax chart are required.
- An error is issued if any subcommand is empty.
Operations
- Models are applied to variables in the active dataset with the same names as the variables that are specified in the model.
-
TSAPPLY
honors time intervals and periodicity specified with theDATE
command. - The procedure verifies that date variables that are implied by the current date specification exist and that their values coincide with the date specification within the estimation period. If the data are filtered, values of date variables are verified within the filtered subset of data.
- If you choose to reestimate model parameters, reestimation happens within the currently active USE period. If the model has outliers, the outlier periods must be inside the effective USE period. The USE period is ignored if model parameters are not reestimated.
- The
PREDICT
command defines the end of the forecast period for tables, charts, and model variables that are produced byTSAPPLY
. -
TSAPPLY
does not honor the following commands:MODEL NAME
,SAVE MODEL
, andREAD MODEL
. -
TSAPPLY
does not honorTSET
. It does, however, provide options for missing-value handling, setting the width of confidence intervals, and setting the maximum number of lags displayed for autocorrelations. - The
TDISPLAY
command does not display models that are saved by usingTSAPPLY
.
Limitations
- An error occurs if
SPLIT FILE
is in effect. -
WEIGHT
is ignored with a warning.