REGSELECT Procedure
Example 30.3 SCAD and MCP Selection
(View the complete code for this example.)
This example continues the investigation of the baseball data set that was introduced in the section Getting Started: REGSELECT Procedure and in LASSO and Elastic Net Selection. That example uses convex penalized selection—the LASSO and elastic net methods—to select an optimal model. In comparison, this example explores model selection by using folded concave penalized selection—the smoothly clipped absolute deviation (SCAD) and minimax concave penalty (MCP)—to select an optimal model.
The following statements perform SCAD selection for the baseball data:
proc regselect data=mylib.baseball;
partition roleVar = league(train='National' validate='American');
class division;
model logSalary = division nAtBat nHits nHome nRuns nRBI nBB
yrMajor crAtBat crHits crHome crRuns crRbi
crBB nOuts nAssts nError;
selection method = scad(choose=validate) details=all;
run;
The PARTITION statement assigns observations to training and validation roles on the basis of the values of the input variable league. The METHOD=SCAD option requests SCAD selection, and the CHOOSE=VALIDATE suboption in the SELECTION statement selects the model that yields the lowest average square error (ASE) value for the validation data.
The "Selection Information" table in Output 30.3.1 shows the information that is relevant to SCAD selection, including the solver type (mixed integer linear programming, or MILP) and the ranges of the regularization parameters.
Output 30.3.1: Basic Information about SCAD Selection with MILP Solver
| Basic Information about SCAD Selection |
| Number of Observations Read | 322 |
|---|---|
| Number of Observations Used | 263 |
| Number of Observations Used for Training | 124 |
| Number of Observations Used for Validation | 139 |
| Number of Observations Used for Testing | 0 |
Recall that the SCAD estimator solves the following minimization problem:
This section explains in detail how PROC REGSELECT computes the reported regularization parameter ranges. The values of the grid points of are
by default. In addition, the number of nonintercept parameters is
. Based on this information and the standard deviation of the response variable, the maximum and minimum values of
are computed in the following way by using the formulas in the section Folded Concave Penalized Selection in Chapter 2, Shared Concepts:
The default pattern of the grid is such that the values of the grid are evenly spaced on the logarithmic scale, based on the computed
and
values.
The "Selection Summary" table in Output 30.3.2 shows the values of and
together with the validation ASE and objective value at each step. The model that has the lowest validation ASE value is chosen as the final model.
Output 30.3.3 shows the details of this selected model, including fit statistics and parameter estimates. Notice that the model selected by the SCAD method has lower training and validation ASE values than the models selected by the LASSO method (Output 30.2.3) and the adaptive LASSO method (Output 30.2.6). This example demonstrates the advantages of nonconvex penalties over convex penalties.
Furthermore, you can find that for each fixed , the number of effects increases as the value of
decreases to zero.
Output 30.3.2: Summary of SCAD Selection with MILP Solver
| Selection Summary | ||||||
|---|---|---|---|---|---|---|
| Step | Alpha | Lambda | Number of Effects | Validation ASE | Objective Value | Convergence Status |
| 1 | 2.7 | 0.3541421718 | 3 | 0.6201 | -519.8250989 | Success |
| 2 | 2.7 | 0.2393372071 | 6 | 0.4730 | -242.594577 | Success |
| 3 | 2.7 | 0.161749442 | 5 | 0.3750 | -120.7055356 | Success |
| 4 | 2.7 | 0.1093138936 | 5 | 0.3564 | -68.35415937 | Success |
| 5 | 2.7 | 0.0738767763 | 6 | 0.3511 | -44.77561769 | Success |
| 6 | 2.7 | 0.0499275791 | 7 | 0.3712 | -34.64228789 | Success |
| 7 | 2.7 | 0.0337421756 | 8 | 0.3684 | -30.37638497 | Success |
| 8 | 2.7 | 0.0228037176 | 10 | 0.3945 | -28.63035462 | Success |
| 9 | 2.7 | 0.0154112628 | 12 | 0.3387* | -28.05955057 | Success |
| 10 | 2.7 | 0.0104152764 | 14 | 0.3627 | -27.90925291 | Success |
| . | . | . | . | . | . | . |
| . | . | . | . | . | . | |
| . | . | . | . | . | . | |
| 31 | 5.7 | 0.3541421718 | 3 | 0.6201 | -939.7201363 | Success |
| 32 | 5.7 | 0.2393372071 | 6 | 0.4730 | -434.3757135 | Success |
| 33 | 5.7 | 0.161749442 | 5 | 0.3913 | -206.6854888 | Success |
| 34 | 5.7 | 0.1093138936 | 6 | 0.3592 | -105.4374547 | Success |
| 35 | 5.7 | 0.0738767763 | 6 | 0.3521 | -61.19314233 | Success |
| 36 | 5.7 | 0.0499275791 | 8 | 0.3493 | -41.82085843 | Success |
| 37 | 5.7 | 0.0337421756 | 8 | 0.3564 | -33.43914549 | Success |
| 38 | 5.7 | 0.0228037176 | 9 | 0.3634 | -29.87208286 | Success |
| 39 | 5.7 | 0.0154112628 | 10 | 0.3909 | -28.44965297 | Success |
| 40 | 5.7 | 0.0104152764 | 14 | 0.3644 | -28.01750434 | Success |
| * Optimal Value of Criterion | ||||||
Output 30.3.3: Details of Model Selected by SCAD with MILP Solver
| Details of the Model Selected by SCAD Method |
| Root MSE | 0.60291 |
|---|---|
| R-Square | 0.57622 |
| Adj R-Sq | 0.53460 |
| AIC | 11.89325 |
| AICC | 15.20234 |
| SBC | -80.26338 |
| ASE (Train) | 0.32832 |
| ASE (Validate) | 0.33873 |
You can also directly supply your own choice of regularization parameters to obtain a model fit. The following program produces an equivalent final model by taking the selected and
values from the previous analysis:
proc regselect data=mylib.baseball;
partition roleVar = league(train='National' validate='American');
class division;
model logSalary = division nAtBat nHits nHome nRuns nRBI nBB
yrMajor crAtBat crHits crHome crRuns crRbi
crBB nOuts nAssts nError;
selection method = scad(alpha=2.7 lambda=0.0154112628
solver=MILP choose=validate);
run;
Suppose you have a good estimate of the regularization parameter , and you want to use the nonlinear programming (NLP) solver instead of the default MILP solver to search for the best regularization parameter
. You can perform SCAD selection in the following way:
proc regselect data=mylib.baseball;
partition roleVar = league(train='National' validate='American');
class division;
model logSalary = division nAtBat nHits nHome nRuns nRBI nBB
yrMajor crAtBat crHits crHome crRuns crRbi
crBB nOuts nAssts nError;
selection method = scad(alpha=2.7 solver=NLP choose=validate)
details=all;
run;
The "Selection Summary" table in Output 30.3.4 shows the optimal validation ASE as well as the value of the objective function for the SCAD selection with the NLP solver. Both values are larger than the ones that are produced by using the MILP solver, shown in Output 30.3.2. In general, the NLP solver is faster but more prone to return local minima because of possible nonconvexity of the reformulated objective function.
Output 30.3.4: Summary of SCAD Selection with NLP Solver
| Selection Summary | ||||||
|---|---|---|---|---|---|---|
| Step | Alpha | Lambda | Number of Effects | Validation ASE | Objective Value | Convergence Status |
| 1 | 2.7 | 0.3541421718 | 19 | 0.3630 | -27.80493462 | Success |
| 2 | 2.7 | 0.2393372071 | 19 | 0.3630 | -27.80493462 | Success |
| 3 | 2.7 | 0.161749442 | 19 | 0.3630 | -27.80493462 | Success |
| 4 | 2.7 | 0.1093138936 | 6 | 0.3925 | -67.45873747 | Success |
| 5 | 2.7 | 0.0738767763 | 5 | 0.3503* | -44.63943247 | Success |
| 6 | 2.7 | 0.0499275791 | 8 | 0.3765 | -33.8969659 | Success |
| 7 | 2.7 | 0.0337421756 | 11 | 0.3648 | -29.88490975 | Success |
| 8 | 2.7 | 0.0228037176 | 13 | 0.3729 | -28.09912771 | Success |
| 9 | 2.7 | 0.0154112628 | 16 | 0.3583 | -27.94140961 | Success |
| 10 | 2.7 | 0.0104152764 | 18 | 0.3627 | -27.8278866 | Success |
| * Optimal Value of Criterion | ||||||
| The model at Step 5, where Alpha = 2.7 and Lambda = 0.0738767763, is selected. |
| Selected model converged. All regularization parameters succeeded. |
| Selected Effects: | Intercept nAtBat nHome nBB YrMajor |
|---|
Like SCAD selection, MCP selection also applies a nonconvex penalty to the penalized least squares objective function. The penalty function takes the following form:
The following statements perform MCP selection with a fixed value of 1.7. The default solver is MILP.
proc regselect data=mylib.baseball;
partition roleVar = league(train='National' validate='American');
class division;
model logSalary = division nAtBat nHits nHome nRuns nRBI nBB
yrMajor crAtBat crHits crHome crRuns crRbi
crBB nOuts nAssts nError;
selection method = mcp(alpha=1.7 choose=validate) details=all;
run;
Output 30.3.6 shows that the model selected by MCP method also has lower training and validation ASE values than those produced by the LASSO method (Output 30.2.3) and the adaptive LASSO method (Output 30.2.6).
Output 30.3.5: Summary of MCP Selection with MILP Solver
| Selection Summary | ||||||
|---|---|---|---|---|---|---|
| Step | Alpha | Lambda | Number of Effects | Validation ASE | Objective Value | Convergence Status |
| 1 | 1.7 | 0.3541421718 | 2 | 0.4843 | -4.780739689 | Success |
| 2 | 1.7 | 0.2393372071 | 3 | 0.3575 | -12.4381079 | Success |
| 3 | 1.7 | 0.161749442 | 3 | 0.3566 | -18.97905906 | Success |
| 4 | 1.7 | 0.1093138936 | 4 | 0.3847 | -22.07263121 | Success |
| 5 | 1.7 | 0.0738767763 | 5 | 0.3775 | -24.32243067 | Success |
| 6 | 1.7 | 0.0499275791 | 7 | 0.3711 | -25.60457593 | Success |
| 7 | 1.7 | 0.0337421756 | 9 | 0.3980 | -26.47039039 | Success |
| 8 | 1.7 | 0.0228037176 | 12 | 0.3387* | -27.07526271 | Success |
| 9 | 1.7 | 0.0154112628 | 14 | 0.3627 | -27.45939653 | Success |
| 10 | 1.7 | 0.0104152764 | 14 | 0.3627 | -27.63619212 | Success |
| * Optimal Value of Criterion | ||||||
| The model at Step 8, where Alpha = 1.7 and Lambda = 0.0228037176, is selected. |
| Selected model converged. All regularization parameters succeeded. |
| Selected Effects: | Intercept Division_West nHits nHome nRuns nRBI nBB YrMajor CrAtBat CrBB nOuts nError |
|---|
Output 30.3.6: Details of Model Selected by MCP with MILP Solver
| Root MSE | 0.60291 |
|---|---|
| R-Square | 0.57622 |
| Adj R-Sq | 0.53460 |
| AIC | 11.89325 |
| AICC | 15.20234 |
| SBC | -80.26338 |
| ASE (Train) | 0.32832 |
| ASE (Validate) | 0.33873 |
| Parameter Estimates | ||
|---|---|---|
| Parameter | DF | Estimate |
| Intercept | 1 | 4.252427 |
| Division_West | 1 | -0.179169 |
| nHits | 1 | 0.007232 |
| nHome | 1 | 0.029747 |
| nRuns | 1 | -0.007002 |
| nRBI | 1 | -0.004489 |
| nBB | 1 | 0.014063 |
| YrMajor | 1 | 0.095316 |
| CrAtBat | 1 | 0.000109 |
| CrBB | 1 | -0.000964 |
| nOuts | 1 | 0.000160 |
| nError | 1 | -0.007590 |
For more information about the SCAD and MCP selection methods, see the section Folded Concave Penalized Selection in Chapter 2, Shared Concepts.