The TSMODEL Procedure
PROC TSMODEL Statement
PROC TSMODEL options;
The PROC TSMODEL statement invokes the TSMODEL procedure. You can specify the following options:
- AUXDATA=CAS-libref.data-table
names a table that contains auxiliary input data for the procedure to use for supplying time series variables. CAS-libref.data-table is a two-level name, where CAS-libref refers to the
casliband session identifier, and data-table specifies the name of the input data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs. For more information, see the section Auxiliary Tables.- DATA=CAS-libref.data-table
-
names the input data table for PROC TSMODEL to use. The default is the most recently created data table. CAS-libref.data-table is a two-level name, where
- CAS-libref
refers to a collection of information that is defined in the LIBNAME statement and includes the
caslib, which includes a path to the data, and a session identifier, which defaults to the active session but which can be explicitly defined in the LIBNAME statement. For more information about CAS-libref, see the section Using CAS Sessions and CAS Engine Librefs.- data-table
specifies the name of the input data table.
- INOBJ=(object-name=CAS-libref.data-table …)
-
specifies pairs, each of which binds a repeater object specified by object-name with an input table specified by CAS-libref.data-table. You can specify one or more object-table pairs as needed to associate the repeater objects that you declare in your user-defined program with their input tables. You must specify a binding for any repeater object that you declare in your program; otherwise, a parse-time error is generated when you submit the program and no execution occurs. Consider the following SAS code:
inobj=(inest=mycas.outest inspec=mycas.outspec)This code binds the repeater objects named INEST and INSPEC to the CAS tables
mycas.outestandmycas.outspec, respectively. In addition to the columns that are required to satisfy the built-in table schema of a particular repeater object, each specified table must have all or none of the BY variables of the primary DATA= table. When the INOBJ= table has none of the BY variables, all the CAS table rows are input.Repeater objects are defined in various packages that use PROC TSMODEL as a method to input data that are required for each application. For more information about creating repeater objects for a package, see SAS Visual Forecasting: Time Series Packages. For more information about package access, see the section REQUIRE Statement.
- INSCALAR=CAS-libref.data-table
-
specifies a table to supply scalar dynamic variables to be included and made accessible to your program code as it executes.
CAS-libref.data-table is a two-level name, where CAS-libref refers to the
casliband session identifier, and data-table specifies the name of the input data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.When you specify BY variables for the DATA= table, the INSCALAR= table must contain those BY variables. If you do not specify BY variables, then the INSCALAR= table is read unqualified for the BY variables across the CAS workers in the CAS session. In this case, only a single value for each variable is needed, and only a single row is required in the table. If the table contains multiple rows in this case, an error is generated when the procedure is called. If you specify this option, then you must also specify one or more INSCALARS statements to specify the variables that you want to include for your program to access.
If BY variables are specified in a BY statement, then the table specified in the INSCALAR= option must contain all the specified BY variables or none of them. If BY variables are present in the INSCALAR= table, then the values for the variables specified in the INSCALARS statement are input subject to BY-group processing. If BY variables are not present in the INSCALAR= table, then only a single value of each variable specified in the INSCALARS statement is input for all BY groups. It is an error for the INSCALARS= table to contain more than one value (row) for the variables if the table is not subject to BY-group processing. If the INSCALARS= table is subject to BY-group processing and multiple values (rows) are present for any BY group, then the value can be input from any row, leading to inconsistent results. For consistent results, you should prepare the INSCALAR= tables such that only a single value is input for each BY group.
- LEAD=n
-
specifies the number of periods ahead to extend time series arrays for the variables in both the VAR and OUTARRAYS statements that are output to the CAS table. You can specify this option to accommodate a forecast lead or horizon when you are preparing time series data for forecasting.
The value of n is relative to the ending value of the input time ID for each BY group as specified by the TRIMID= option in the ID statement; it is not relative to the last nonmissing observation of a particular series. By default, LEAD=0.
- LOGCONTROL=(severity=IGNORE | KEEP <severity=IGNORE | KEEP…>)
-
specifies pairs that define error severity and associated message disposition for the OUTLOG= option. You can specify multiple LOGCONTROL= options.
You can specify zero or more pairs. In these pairs, severity can take one of the following values:
- NONE
specifies messages that have no severity classification.
- NOTE
specifies messages whose severity classification is NOTE.
- WARNING
specifies messages whose severity classification is WARNING.
- ERROR
specifies messages whose severity classification is ERROR.
You can specify the following values to indicate the associated message disposition:
- IGNORE
ignores messages of the specified severity.
- KEEP
retains messages of the specified severity.
This option is applied only when you specify an OUTLOG= option; otherwise, it has no effect. By default, LOGCONTROL=(ERROR=KEEP) when the OUTLOG= option is specified. This default value retains only messages whose severity classification is ERROR and discards all others. However, the default behavior no longer applies when you specify the LOGCONTROL= option. For example, if you specify LOGCONTROL=(NONE=KEEP), then only messages that have no severity classification are retained and all others (that is, those whose classification is NOTE, WARNING, or ERROR) are discarded.
- NTHREADS=n
specifies the number of threads that are used per worker node in a CAS session. Threads are used to both preprocess and analyze input data in parallel. You must specify a value n that is greater than or equal to 0. If you specify 0, the number of threads is set to the maximum number of licensed cores. By default, NTHREADS=0.
- OUT=CAS-libref.data-table
-
names the output table to contain the time series variables that are specified in the subsequent VAR statements.
CAS-libref.data-table is a two-level name, where CAS-libref refers to the
casliband session identifier, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.If BY variables are specified, they are also included in this output table. The ID variable’s fixed-interval time ID sequence is included in the OUT= CAS table. The time series variables are accumulated based on the INTERVAL= option and the variable’s ACCUMULATE= option. The OUT= CAS table is particularly useful when you want to further analyze, model, or forecast the resulting time series with other SAS procedures.
- OUTARRAY=CAS-libref.data-table
-
names the output table to contain the time series vectors that are specified in the VAR and OUTARRAYS statements. CAS-libref.data-table is a two-level name, where CAS-libref refers to the
casliband session identifier, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.This table also contains the variables that are specified in the BY, ID, and VAR statements in addition to the arrays that are specified in the OUTARRAYS statements.
- OUTLOG=CAS-libref.data-table
-
names the output table to contain textual messages that are collected from the execution of the BY-group processing.
Messages captured for the BY group are subject to prefiltering by their severity based on the setting of the LOGCONTROL= option. If PUTTOLOG=YES is specified, then messages from the PUT programming statement are also included in this table. This table has rows only for BY groups that generate text messages. Messages that are related to the PROC TSMODEL syntax are not included in this table. Normally, this table contains no rows.
- OUTOBJ=(object-name=CAS-libref.data-table …)
-
specifies pairs, each of which binds a collector object specified by object-name with an output table specified by CAS-libref.data-table.
CAS-libref.data-table is a two-level name, where CAS-libref refers to the
casliband session identifier, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.You can specify one or more object-table pairs as needed to associate the collector objects that you declare in your user-defined program with their output tables. You must specify a binding for any collector object that you declare in your program; otherwise, a parse-time error is generated when you submit the program and no execution occurs. Consider the following SAS code:
outobj=(oss=mycas.saleoss1 pest=mycas.salepest1 ofor=mycas.salefor1 oind=mycas.saleind1 ostat=mycas.salestat1)This code binds the collector objects named OSS, PEST, OFOR, OIND, and OSTAT to the tables named
SALEOSS1,SALEPEST1,SALEFOR1,SALEIND1, andSALESTAT1, respectively,. These tables are all created using CAS-related context from themycaslibref.Collector objects are defined in various packages that can be run by PROC TSMODEL. For more information about using packages, see SAS Visual Forecasting: Time Series Packages. For more information about package access, see the section REQUIRE Statement.
- OUTSCALAR=CAS-libref.data-table
-
names the output table to contain the scalar names that are specified in the OUTSCALARS statements. CAS-libref.data-table is a two-level name, where CAS-libref refers to the
casliband session identifier, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.This table also contains the variables that are specified in the BY statement and the scalars that are specified in the OUTSCALARS statements.
- OUTSUM=CAS-libref.data-table
-
names the output table to contain the descriptive statistics. CAS-libref.data-table is a two-level name, where CAS-libref refers to the
casliband session identifier, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.The descriptive statistics are based on the accumulated time series when the ACCUMULATE= option, the SETMISSING= option, or both are specified in the ID or VAR statements. This table is particularly useful when you want to analyze large numbers of series and you need a summary of the results.
- PUTTOLOG=YES | NO
-
specifies whether to capture messages from the PUT programming statement to the BY group’s row in the table that is specified in the OUTLOG= option. You can specify the following values:
- NO
does not capture messages.
- YES
captures messages.
This option is applied only when you specify the OUTLOG= option; otherwise, it has no effect. This option should be used only to aid in debugging your user-defined programs on small amounts of data. This option can produce large amounts of output that increases processing time and memory usage in your CAS session processes and should be used with caution. By default, PUTTOLOG=NO.
- SEASONALITY=number
specifies the length of the seasonal cycle. For example, SEASONALITY=3 means that every group of three time periods forms a seasonal cycle. By default, the length of the seasonal cycle is 1 (no seasonality) or the length that is implied by the INTERVAL= option in the ID statement. For example, INTERVAL=MONTH implies that the length of the seasonal cycle is 12.