The MODELMATRIX Procedure

OUTPUT Statement

  • OUTPUT OUT=CAS-libref.data-table <options>;

The OUTPUT statement creates a CAS table that contains the design matrix, which is computed after the model parameters are created (and levelized when CLASS variables are included). The variables in the input data table are not included in the output data table, in order to avoid data duplication for large data tables; however, variables that you specify in the COPYVARS= option are included.

You must specify the following option:

OUT=CAS-libref.data-table

names the output data table for PROC MODELMATRIX to use. You must specify this option before any other options. 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 where the data table is to be stored, 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 output data table.

You can also specify the following syntax elements:

PREFIX=name

enforces the column names of the design matrix to be a user-defined prefix appended to a sequence of one-based indices in the OUTDESIGN= data set. The default prefix is Col and the column name is formed by appending the column number to the prefix, so that by default the columns are named Col1, Col2, and so on.

COPYVAR=variable
COPYVARS=(variables)

transfers one or more variables from the input data table to the output data table and appends them to the right end of the design matrix in the specified order.

Last updated: December 21, 2018