The PHSELECT Procedure
Example 19.1 Model Selection
The following statements examine the same data as in the section Getting Started: PHSELECT Procedure, but they request model selection via the forward selection technique. Effects that provide the best improvement to the selection criterion, the Schwartz Bayesian criterion (SBC), are added until no more effects can improve the selection criterion. The DETAILS=ALL option in the SELECTION statement produces all tables that are related to model selection. The PLOTS=ALL option produces graphics to help you interpret the selection process. ODS Graphics must be enabled before you can request plots. (For more information about ODS Graphics, see the section ODS Graphics.)
ods graphics on;
proc phselect data=mycas.getStarted;
class C1-C3;
model Time*Status(0) = C1-C3 X1-X4;
selection method=forward(stop=sbc select=sbc) details=all plots=all;
run;
The model selection tables are shown in Output 19.1.1 through Output 19.1.3. Results from the selected model are shown in Output 19.1.4 and Output 19.1.5. Selection graphics that the PLOTS= option produces are displayed in Output 19.1.6 and Output 19.1.7.
The "Selection Information" table in Output 19.1.1 summarizes the settings for the model selection. Effects are added to the model only if they produce a significant improvement, which is determined by comparing their SBC values. The forward selection stops three steps after the smallest SBC is obtained or when all effects have been added to the model.
Output 19.1.1: Selection Information
| Selection Information | |
|---|---|
| Description | Value |
| Selection Method | Forward |
| Select Criterion | SBC |
| Stop Criterion | SBC |
| Effect Hierarchy Enforced | None |
| Stop Horizon | 3 |
For each step of the selection process, the DETAILS=ALL option displays the candidate effects for entering the model along with their SELECT= criterion. Output 19.1.2 displays this table for the first step; the other steps are not shown here.
Output 19.1.2: Step1 Entry Candidates
| Entry Candidates | ||
|---|---|---|
| Rank | Effect | SBC |
| 1 | X1 | 536.7462 |
| 2 | X4 | 539.8497 |
| 3 | C2 | 544.9948 |
| 4 | X3 | 548.2815 |
| 5 | X2 | 548.9490 |
| 6 | C3 | 549.1132 |
| 7 | C1 | 551.8649 |
The DETAILS=ALL option also displays the dimensions, fit statistics, and parameter estimates at each step of the selection process; these details are not shown here.
When the selection procedure is complete, the "Selection Summary" table in Output 19.1.3 shows the effects that were added to the model and the value of their selection criterion (and the choose and stop criteria, if they are specified). In step 1, effect X1 made the most significant contribution to the model among the candidate effects, according to the SBC statistic. In step 2, X4 made the most significant contribution when an effect was added to a model that contains X1. In the three subsequent steps, no effect could be added to the model that would reduce the SBC value, so variable selection stopped because the stop horizon (see Output 19.1.1) indicates that at most three steps beyond the minimum SBC value are taken.
In Output 19.1.3, the "Selection Summary" table is followed by three small tables that summarize why the process stopped and which model is selected.
Output 19.1.3: Selection Summary Information
| Selection Summary | |||
|---|---|---|---|
| Step | Effect Entered | Number Effects In | SBC |
| 1 | X1 | 1 | 536.7462 |
| 2 | X4 | 2 | 535.1652* |
| 3 | C1 | 3 | 538.2917 |
| 4 | X2 | 4 | 539.2661 |
| 5 | X3 | 5 | 542.4842 |
| * Optimal Value Of Criterion | |||
| Selection stopped at a local minimum of the SBC criterion. |
| The model at step 2 is selected. |
| Selected Effects: | X1 X4 |
|---|
Output 19.1.4 displays information about the selected model. Notice that the –2 log-likelihood value in the "Fit Statistics" table is larger than the value for the full model in Figure 7. This is expected because the selected model contains only a subset of the parameters. Because the selected model is more parsimonious than the full model, the discrepancy between the –2 log likelihood and the information criteria is less severe than that shown in Figure 7 in the "Getting Started" example.
Output 19.1.4: Dimensions and Fit Statistics
| Dimensions | |
|---|---|
| Number of Effects | 2 |
| Max Effect Columns | 1 |
| Columns in Design | 2 |
| Rank of Design | 2 |
| Fit Statistics | |
|---|---|
| -2 Log Likelihood | 526.74445 |
| AIC (smaller is better) | 530.74445 |
| AICC (smaller is better) | 530.91346 |
| SBC (smaller is better) | 535.35258 |
The parameter estimates of the selected model are shown in Output 19.1.5. Notice that the effects are listed in the "Parameter Estimates" table in the order in which they are specified in the MODEL statement and not necessarily in the order in which they are added to the model.
Output 19.1.5: Parameter Estimates
| Parameter Estimates | |||||
|---|---|---|---|---|---|
| Parameter | DF | Estimate | Standard Error | Chi-Square | Pr > ChiSq |
| X1 | 1 | 1.605306 | 0.513811 | 9.7613 | 0.0018 |
| X4 | 1 | -0.123304 | 0.046697 | 6.9723 | 0.0083 |
The coefficient panel in Output 19.1.6 enables you to visualize the selection process. In this plot, standardized coefficients of all the effects that are selected at some step of the stepwise method are plotted as a function of the step number. This enables you to assess the relative importance of the effects that are selected at any step of the selection process and to know when effects entered the model. The lower plot in the panel shows how the criterion that is used to choose the selected model changes as effects enter or leave the model.
Output 19.1.6: Coefficient Progression

The criterion panel in Output 19.1.7 provides a graphical view of the progression of the fit criteria as the selection process evolves. Notice at Step 2 that the SBC value seems to be at its minimum. Because the stop horizon value is 3 (see Output 19.1.1), three more steps are taken to determine if Step 2 is a global optimum. None of these three subsequent steps have a smaller SBC value than in Step 2, so the global optimum is at step 2.
Output 19.1.7: Criterion Panel
