MODEL Subcommand (TSAPPLY command)
The MODEL
subcommand is required
and specifies an external file, referred to as a model file, containing models that
are developed by using TSMODEL
. A model file specifies lag structure, parameters, outliers, and
variables for each model.
-
TSAPPLY
assumes that the variables that are specified in the model file exist in the active dataset. - You can use multiple
MODEL
subcommands to apply two or more sets of models to your data. EachMODEL
subcommand is used to load models from a different model file. For example, one model file might contain models for series that represent unit sales, and another model file might contain models for series that represent revenue.
FILE Keyword
The FILE
keyword is used
to specify an external file containing models, and the keyword is
required.
- A warning is issued if a model variable that is specified in the file does not exist in the active dataset or is not numeric. Models that refer to the variable are ignored.
- A warning is issued if a model specifies a variable transformation (square root or natural log) and one or more model variables to be transformed contain values that are invalid for the specified transformation--for example, negative values. Any such models will not be applied.
- An error occurs if the date
interval or cycle length that is specified in the file is inconsistent
with the date specification for the active dataset. The
SEASONLENGTH
keyword on theAUXILIARY
subcommand can be used to override the date specification for the active dataset. - An error occurs if the file cannot be read or is invalid.
- An error occurs if two or more
MODEL
subcommands specify the same file. - When multiple
MODEL
subcommands are used, a warning occurs if the same model ID occurs in more than one model file. The first model with that ID is loaded. The check for duplicate model IDs takes place afterDROP
andKEEP
are applied to each model file. - A warning is issued,
and forecasts are not available for a model, if
REESTIMATE=NO
and the model's forecast period is inconsistent with the currentUSE
orPREDICT
interval. Specifically, forecasts are not available if model forecasts would start before the beginning of theUSE
period or after the end of thePREDICT
interval.
DROP Keyword
The DROP
keyword is used
to exclude models.
- Specify one or more quoted
model identifiers, enclosed in square brackets—for example,
[’Model_1’ ’Model_2’]
. All other models in the file are loaded and applied to the data. - Redundant items in the
DROP
list are ignored. - An error occurs if all models are dropped.
- Model identifiers that do not exist in the file are ignored.
KEEP Keyword
The KEEP
keyword specifies
models to be applied.
- Specify one or more quoted
model identifiers, enclosed in square brackets—for example,
[’Model_1’ ’Model_2’]
. All other models in the file are excluded. - Redundant items in the
KEEP
list are ignored. - Model identifiers that do not exist in the file are ignored.
-
DROP
andKEEP
are mutually exclusive. An error occurs if both are specified.
OUTFILE and OUTPMML Keywords
The OUTFILE
and OUTPMML
keywords are used to save updated
models
-
OUTFILE
saves an XML file that can be used with other IBM® SPSS® applications. -
OUTPMML
saves a PMML-compliant XML file that can be used with PMML-compliant applications, including IBM SPSS applications. - Models are written to an XML file. Each model is assigned a unique name and a description that includes the name of the dependent variable and the model type.
- The filename must be specified in full. No extension is supplied.
- If two or more
MODEL
subcommands (within a single invocation ofTSMODEL
) specify the same external file, all models that are created by thoseMODEL
subcommands are saved to that file. -
OUTFILE
andOUTPMML
are ignored with a warning ifSPLIT FILE
is in effect.