SUPERLEARNER Procedure
The OUTPUT statement creates a data table that contains observationwise predicted values that PROC SUPERLEARNER computes after fitting the model. To avoid data duplication when you have large data tables, the variables in the input data table are not included in the output data table unless you specify them in the COPYVARS= option.
You must specify the following option:
-
OUT=libref.data-table
-
names the output data table for PROC SUPERLEARNER 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 options:
-
COPYVAR=variable
COPYVARS=(variables)
transfers one or more variables from the input data table to the output data table.
-
LEARNERPRED
computes predicted response values by using each trained base learner model. The default name of the computed variable in the output data table is the name of the base learner that you specify in the BASELEARNER statement. You can use this option to compare base learner and super learner model predictions.
-
MARGINPRED
outputs the predicted response values under each intervening scenario that you specify in a MARGIN statement. The default name of the computed variable in the output data table is the name that you specify in the MARGIN statement.
Last updated: May 14, 2026