MODELMATRIX Procedure
The OUTPUT statement creates an output 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=libref.data-table
-
names the output data table for PROC MODELMATRIX to use. You must specify this option before any other options. libref.data-table is a two-level name, where
- libref
refers to a collection of information that is defined in the LIBNAME statement and includes the library, which includes a path to where the data table is to be stored. For more information about libref, see the section Using SAS Viya Workbench.
- 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: May 14, 2026