VARREDUCE Procedure
Unsupervised Variable Selection
The following statements use PROC VARREDUCE for unsupervised variable selection:
proc varreduce data=mylib.getStarted technique=VarianceAnalysis;
class C;
reduce unsupervised C x1-x10 / maxeffects=5 varexp=0.99;
run;
The TECHNIQUE= option in the PROC VARREDUCE statement specifies variance analysis as the technique to be used for variable selection. In the REDUCE statement, the MAXEFFECTS= option specifies 5 as the maximum number of variables to select, and the VAREXP= option specifies 99% as the maximum percentage of the total variance to explain. The procedure stops when either of these two conditions is satisfied.
The output from this analysis is presented in Figure 1 through Figure 3.
Figure 1 displays the "Number of Observations" tables. This table shows that all 100 observations in the data table are used in the analysis.
Figure 1: Number of Observations
| Number of Observations Read | 100 |
|---|---|
| Number of Observations Used | 100 |
Figure 2 and Figure 3 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 2: Selection Summary
| Selection Summary | |||||||
|---|---|---|---|---|---|---|---|
| Iteration | Parameter | Proportion of Variance Explained | SSE | MSE | AIC | AICC | BIC |
| 1 | x3 | 0.068102 | 18.637953 | 0.188262 | 7.105200 | 27.216339 | 2.971252 |
| 2 | x7 | 0.132579 | 17.348424 | 0.177025 | 6.993502 | 26.094008 | 2.945605 |
| 3 | x10 | 0.193293 | 16.134131 | 0.166331 | 6.860937 | 24.945494 | 2.919092 |
| 4 | C I | 0.252883 | 14.942348 | 0.155649 | 6.704199 | 23.767490 | 2.888406 |
| 5 | C F | 0.311964 | 13.760728 | 0.144850 | 6.521819 | 22.558528 | 2.852077 |
| 6 | C J | 0.368951 | 12.620982 | 0.134266 | 6.315361 | 21.320171 | 2.811671 |
| 7 | C B | 0.425720 | 11.485609 | 0.123501 | 6.081095 | 20.048690 | 2.763457 |
| 8 | C G | 0.481257 | 10.374861 | 0.112770 | 5.819386 | 18.744449 | 2.707799 |
| 9 | C D | 0.535098 | 9.298037 | 0.102176 | 5.529803 | 17.407018 | 2.644269 |
| 10 | C H | 0.588910 | 8.221792 | 0.091353 | 5.206788 | 16.030839 | 2.567305 |
| 11 | C A | 0.640665 | 7.186698 | 0.080749 | 4.852232 | 14.617801 | 2.478801 |
| 12 | x5 | 0.691609 | 6.167815 | 0.070089 | 4.459345 | 13.161117 | 2.371965 |
Figure 3: Selected Effects
| Selected Effects | ||
|---|---|---|
| Number | Selected Variable | Variable Type |
| 1 | x3 | INTERVAL |
| 2 | x7 | INTERVAL |
| 3 | x10 | INTERVAL |
| 4 | C | CLASS |
| 5 | x5 | INTERVAL |