The QTRSELECT Procedure
OUTPUT Statement
OUTPUT OUT=CAS-libref.data-table<COPYVARS=(variables)><keyword <=name>>…<keyword <=name>>;
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. If you specify multiple quantile levels by using the QUANTILES option in the MODEL statement, then for each appropriate keyword that is specified in the OUTPUT statement, one variable is generated for each specified quantile level. 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:
You can also specify the following syntax elements:
If you specify multiple quantile levels by using the QUANTILES option in the MODEL statement, then for each appropriate keyword that is specified in the OUTPUT statement, one variable is generated for each specified quantile level. These variables appear in the same order as the specified quantile levels. For example, the following statements generate the mycas.out data table, which contains the two predicted quantile variables p1 and p2:
proc qtrselect data=mycas.one; model y = x1-x4 /quantiles=0.5 0.3; output out=mycas.out pred=p; run;
The variable p1 is for quantile level 0.5, and the variable p2 is for quantile level 0.3.
By using the SORT suboption in the QUANTILES option, the following statements generate the mycas.out data table in sorted order:
proc qtrselect data=mycas.one; model y = x1-x4 /quantiles(sort)=0.5 0.3; output out=mycas.out pred=p; run;
The variable p1 is for quantile level 0.3, and the variable p2 is for quantile level 0.5, because the sorted quantile levels are (0.3 0.5).
In addition to the preceding statistics, you can also use the keywords listed in Table 18.7 in the OUTPUT statement to obtain additional statistics. 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 18.7: Keywords for OUTPUT Statement