VARREDUCE Procedure

Supervised Variable Selection

The following statements use PROC VARREDUCE for supervised variable selection. The CLASS statement specifies that y is a categorical response variable. The TECHNIQUE= option specifies discriminant analysis as the technique to be used for variable selection. The MAXEFFECTS= option in the REDUCE statement specifies 5 as the maximum number of variables to select.

proc varreduce data=mylib.getStarted technique=DiscriminantAnalysis;
   class C y;
   reduce supervised y = C x1-x10 / maxeffects=5;
run;

The output from this analysis is presented in Figure 4 through Figure 6.

Figure 4 shows that all 100 observations in the data table are used in the analysis.

Figure 4: Number of Observations

The VARREDUCE Procedure

Number of Observations Read100
Number of Observations Used100


Figure 5 and Figure 6 show the "Selection Summary" and "Selected Effects" tables. The "Selection Summary" table shows which variable (or level for CLASS variables) is selected in each step, in addition to showing the total variance that is explained by the variables selected so far. The "Selected Effects" table presents all the selected variables and their corresponding variable types.

Figure 5: Selection Summary

Selection Summary
IterationParameterProportion
of Variance
Explained
SSEMSEAICAICCBIC
1C J0.0810990.9189010.0092820.0154242.019590-0.038525
2x80.1323030.8676970.008854-0.0019132.005456-0.049809
3x20.1687470.8312530.008570-0.0048212.006669-0.046665
4C C0.1991520.8008480.008342-0.0020842.014475-0.037877
5x40.2183660.7816340.0082280.0136312.036240-0.016110
6x90.2368680.7631320.0081180.0296762.0593460.005986


Figure 6: Selected Effects

Selected Effects
NumberSelected
Variable
Variable
Type
1CCLASS
2x8INTERVAL
3x2INTERVAL
4x4INTERVAL
5x9INTERVAL


Last updated: September 22, 2026