The CSSM Procedure

SCORE Statement

  • SCORE <IN=CAS-table> <OUT=CAS-table> ;

The SCORE statement enables you to use the fitted model for scoring. By using the IN= and OUT= options in the SCORE statement, you can create, reuse, and update a score store. The score store contains sufficient context information so that you can perform many tasks, such as scenario analysis and forecasting for streaming data, without having to fit the model again. The score store is a CAS binary large object (BLOB) table, which uses a binary file format that cannot be edited or viewed like a typical CAS data table. For more information about using state space models for scoring, see the section Scoring with State Space Models.

IN=CAS-table

specifies a previously created score store to score the rows in the input data table. The rows in the input data table must represent a continuation of the sequential observation process that was used to create the specified score store. In particular, for a given BY group, the smallest value of the ID variable in the current input data table must be the same as or larger than the largest value of the ID variable in the data table that you used to create the score store. When you specify the IN= option in the SCORE statement, the statements that are used for model specification (such as the MODEL, STATE, and TREND statements, and so on) are not needed; in addition to the PROC CSSM statement and the SCORE statement, only the BY and OUTPUT statements are used when needed.

OUT <(positive-integer)> =CAS-table

specifies an output score-store table for storing the context information. The score store contains all the information that is needed for resuming the forecasting process from the last observation of a given BY group. If the OUT(k)= form of the option is used (where k is some positive integer), the score store keeps additional historical information so that the forecasting begins k time instances before the last observation. If k is larger than the total number of time points in a BY group, it is appropriately reduced. You should use the OUT(k)= form only at the time of score-store creation. In subsequent calls, the value of k that you specify at creation time remains in effect and cannot be changed. That is, k in OUT(k) is ignored when you also specify the IN= option.

When you specify both the IN= and OUT= options, the table names that you specify must be distinct. You can use the IN= and OUT= options by themselves or together. These options are used as follows:

Only OUT=

Used for initial score-store creation.

Only IN=

Used for scoring the rows of the input data table. This is useful for scenario analysis, where the scoring is done repeatedly, each time for different predictor settings. For an example of this use case, see Example 13.19.

Both IN= and OUT=

Used for creating an updated score store that incorporates new information. This is used in the streaming data setting, where new sets of observations become available on a regular basis and the score store must be updated to take into account the latest information. For an example of this use case, see Example 13.20.

Note: Scoring is not currently supported in situations where temporal aggregation or temporal distribution is requested. For more information, see the AGGREGATE and DISTRIBUTE options in the MODEL statement.

Last updated: October 12, 2022