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.
-
TSAPPLYassumes that the variables that are specified in the model file exist in the active dataset. - You can use multiple
MODELsubcommands to apply two or more sets of models to your data. EachMODELsubcommand 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
SEASONLENGTHkeyword on theAUXILIARYsubcommand 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
MODELsubcommands specify the same file. - When multiple
MODELsubcommands 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 afterDROPandKEEPare applied to each model file. - A warning is issued,
and forecasts are not available for a model, if
REESTIMATE=NOand the model's forecast period is inconsistent with the currentUSEorPREDICTinterval. Specifically, forecasts are not available if model forecasts would start before the beginning of theUSEperiod or after the end of thePREDICTinterval.
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
DROPlist 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
KEEPlist are ignored. - Model identifiers that do not exist in the file are ignored.
-
DROPandKEEPare mutually exclusive. An error occurs if both are specified.
OUTFILE and OUTPMML Keywords
The OUTFILE and OUTPMML keywords are used to save updated
models
-
OUTFILEsaves an XML file that can be used with other IBM® SPSS® applications. -
OUTPMMLsaves 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
MODELsubcommands (within a single invocation ofTSMODEL) specify the same external file, all models that are created by thoseMODELsubcommands are saved to that file. -
OUTFILEandOUTPMMLare ignored with a warning ifSPLIT FILEis in effect.