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
| Number of Observations Read | 100 |
|---|---|
| Number of Observations Used | 100 |
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 | |||||||
|---|---|---|---|---|---|---|---|
| Iteration | Parameter | Proportion of Variance Explained | SSE | MSE | AIC | AICC | BIC |
| 1 | C J | 0.081099 | 0.918901 | 0.009282 | 0.015424 | 2.019590 | -0.038525 |
| 2 | x8 | 0.132303 | 0.867697 | 0.008854 | -0.001913 | 2.005456 | -0.049809 |
| 3 | x2 | 0.168747 | 0.831253 | 0.008570 | -0.004821 | 2.006669 | -0.046665 |
| 4 | C C | 0.199152 | 0.800848 | 0.008342 | -0.002084 | 2.014475 | -0.037877 |
| 5 | x4 | 0.218366 | 0.781634 | 0.008228 | 0.013631 | 2.036240 | -0.016110 |
| 6 | x9 | 0.236868 | 0.763132 | 0.008118 | 0.029676 | 2.059346 | 0.005986 |
Figure 6: Selected Effects
| Selected Effects | ||
|---|---|---|
| Number | Selected Variable | Variable Type |
| 1 | C | CLASS |
| 2 | x8 | INTERVAL |
| 3 | x2 | INTERVAL |
| 4 | x4 | INTERVAL |
| 5 | x9 | INTERVAL |