The LOGSELECT Procedure

Example 12.1 Model Selection

The following statements examine the same data as in the section Getting Started: LOGSELECT Procedure, but they request model selection via the forward selection technique. Effects that provide the best improvement to the selection 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 logselect data=mycas.getStarted;
   class C;
   model y = C x1-x10;
   selection method=forward details=all plots=all;
run;

ods graphics off;

The model selection tables are shown in Output 12.1.1 through Output 12.1.3. Results from the selected model are shown in Output 12.1.4 and Output 12.1.5. Selection graphics that the PLOTS= option produces are displayed in Output 12.1.6 and Output 12.1.7.

The "Selection Information" table in Output 12.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 the values of their SBCs. The forward selection stops three steps after the smallest SBC is obtained or when all effects have been added to the model.

Output 12.1.1: Selection Information

The LOGSELECT Procedure

Selection Information
Selection MethodForward
Select CriterionSBC
Stop CriterionSBC
Effect Hierarchy EnforcedNone
Stop Horizon3


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 12.1.2 displays this table for the first step; the other steps are not shown here.

Output 12.1.2: Step1 Entry Candidates

Best 10 Entry Candidates
RankEffectSBC
1x8128.7318
2x2129.0423
3x4129.3708
4x9131.0854
5x1131.8215
6x10132.4430
7x5132.9424
8x3132.9667
9x7133.0021
10x6133.0283


The DETAILS=ALL option also displays the dimensions, global test, 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 12.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). Step 0 refers to the null model that contains only an intercept. In the next step, effect x8 made the most significant contribution to the model among the candidate effects, according to the SBC statistic. In step 2, x2 made the most significant contribution when an effect was added to a model that contains the intercept and x8. In the three subsequent steps, no effect could be added to the model that would reduce the SBC, so variable selection stopped because the stop horizon (see Output 12.1.1) indicates that at most three steps beyond the minimum SBC value are taken.

In Output 12.1.3, the "Selection Summary" table is followed by three small tables that summarize why the process stopped and which model is selected.

Output 12.1.3: Selection Summary Information

Selection Summary
StepEffect
Entered
Number
Effects In
SBC
0Intercept1128.4253
1x82128.7318
2x23128.2892*
3x44130.0901
4x95131.9534
5x16134.7945
* Optimal Value Of Criterion

Selection stopped at a local minimum of the STOP criterion.

The model at step 2 is selected.

Selected Effects:Intercept x2 x8


Output 12.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 9. 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 previously noted.

Output 12.1.4: Fit Statistics and Null Test

Dimensions
Columns in Design3
Number of Effects3
Max Effect Columns1
Rank of Design3
Parameters in Optimization3

Testing Global Null Hypothesis: BETA=0
TestDFChi-SquarePr > ChiSq
Likelihood Ratio29.42370.0090

Fit Statistics
-2 Log Likelihood114.39646
AIC (smaller is better)120.39646
AICC (smaller is better)120.64646
SBC (smaller is better)128.21197


The parameter estimates of the selected model are shown in Output 12.1.5. Notice that the effects are listed in the "Parameter Estimates" table in the order in which they were specified in the MODEL statement and not in the order in which they were added to the model.

Output 12.1.5: Parameter Estimates

Parameter Estimates
ParameterDFEstimateStandard
Error
Chi-SquarePr > ChiSq
Intercept10.8583770.5503022.43310.1188
x21-0.2502400.1145784.77000.0290
x811.7839560.7908455.08850.0241


You can construct the prediction equation for this model from the parameter estimates as follows. The estimated linear predictor for an observation is

ModifyingAbove eta With caret equals 0.8584 minus 0.2502 times x 2 plus 1.7840 times x 8

The predicted probability that variable y takes the value 0 is

ModifyingAbove normal upper P normal r With caret left-parenthesis upper Y equals 0 right-parenthesis equals StartFraction 1 Over 1 plus exp left-brace minus ModifyingAbove eta With caret right-brace EndFraction

The coefficient panel in Output 12.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 12.1.6: Coefficient Progression

Coefficient Progression


The criterion panel in Output 12.1.7 provides a graphical view of the progression of the fit criteria as the selection process evolves. Notice at Step 0 that the SBC criterion seems to be at its minimum. Because the stop horizon value is 3 (see Output 12.1.1), three more steps are taken in case Step 0 is a local optimum. In this example, the global optimum is found two steps later.

Output 12.1.7: Criterion Panel

Criterion Panel


Last updated: September 13, 2022