The OUTPUT statement creates a data table that contains observationwise statistics, which are computed after the model is fitted. 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.
The output statistics are computed based on the parameter estimates for the selected model. For observations in which only the response variable is missing, predicted values are computed even though these observations do not affect the model fit. This enables, for example, predicted values to be computed for new observations.
You must specify the following option:
OUT=CAS-libref.data-table
names the output data table for PROC REGSELECT 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:
COPYVAR=variable
COPYVARS=(variables)
transfers one or more variables from the input data table to the output data table.
keyword <=name>
specifies the statistics to include in the output data table and optionally names the new variables that contain the statistics. Specify a keyword for each desired statistic (see the following list of keywords), followed optionally by an equal sign and a variable to contain the statistic.
If you specify keyword=name, the new variable that contains the requested statistic has the specified name. If you omit the optional =name after a keyword, then a default name is used.
You can specify the following values for keyword to request statistics that are available with all selection methods:
PREDICTED
PRED
P
requests predicted values for the response variable. The default is Pred.
RESIDUAL
RESID
R
requests the residual, calculated as ACTUAL – PREDICTED. The default is Residual.
ROLE
requests a numeric variable that indicates the role played by each observation in fitting the model. The default is _ROLE_. For each observation, the interpretation of this variable is shown in Table 19.6.
Table 19.6: Role Interpretation
Value
Observation Role
0
Not used
1
Training
2
Validation
3
Testing
If you do not partition the input data by using a PARTITION statement, then the role variable value is 1 for observations used in fitting the model, and 0 for observations that have at least one missing or invalid value for the response, regressor, frequency, or weight variables.
In addition to the preceding statistics, you can also use the keywords listed in Table 19.7 in the OUTPUT statement to obtain additional statistics. These statistics are not available if you specify METHOD=LAR or METHOD=LASSO in the SELECTION statement. For computational formulas, see the section Diagnostic Statistics. All the statistics available in the OUTPUT statement are conditional on the selected model and do not take into account the variability introduced when you do model selection.
Table 19.7: Keywords for OUTPUT Statement
Keyword
Description
COOKD
Cook’s D influence statistic
COVRATIO
Standard influence of observation on covariance of betas
DFFIT
Standard influence of observation on predicted value
H
Leverage,
LCL
Lower bound of a % confidence interval for an individual prediction. This includes the variance of the error and the variance of the parameter estimates.
LCLM
Lower bound of a % confidence interval for the expected value (mean) of the dependent variable
LIKEDIST
Likelihood displacement, which measures the change in the error sum of squares when the current observation is deleted
PRESS
ith residual divided by , where h is the leverage and where the model has been refit without the ith observation
RSTUDENT
A studentized residual with the current observation deleted
STDI
Standard error of the individual predicted value
STDP
Standard error of the mean predicted value
STDR
Standard error of the residual
STUDENT
Studentized residuals, which are the residuals divided by their standard errors
UCL
Upper bound of a % confidence interval for an individual prediction
UCLM
Upper bound of a % confidence interval for the expected value (mean) of the dependent variable