The HPLOGISTIC Procedure

Example 55.1 Model Selection

(View the complete code for this example.)

The following HPLOGISTIC statements examine the same data as in the section Getting Started: HPLOGISTIC Procedure, but they request model selection via the forward selection technique. Model effects are added in the order of their significance until no more effects make a significant improvement of the current model. The DETAILS=ALL option in the SELECTION statement requests that all tables related to model selection be produced.

proc hplogistic data=getStarted;
   class C;
   model y = C x1-x10;
   selection method=forward details=all;
run;

The model selection tables are shown in Output 55.1.1 through Output 55.1.4.

The "Selection Information" table in Output 55.1.1 summarizes the settings for the model selection. Effects are added to the model only if they produce a significant improvement as judged by comparing the p-value of a score test to the entry significance level (SLE), which is 0.05 by default. The forward selection stops when no effect outside the model meets this criterion.

Output 55.1.1: Selection Information

The HPLOGISTIC Procedure

Selection Information
Selection MethodForward
Select CriterionSignificance Level
Stop CriterionSignificance Level
Effect Hierarchy EnforcedNone
Entry Significance Level (SLE)0.05
Stop Horizon1


The "Selection Summary" table in Output 55.1.2 shows the effects that were added to the model and their significance level. 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 (p = 0.0381). In step 2 the most significant contribution when adding an effect to a model that contains the intercept and x8 was made by x2. In the subsequent step no effect could be added to the model that would produce a p-value less than 0.05, so variable selection stops.

Output 55.1.2: Selection Summary Information

Selection Summary
StepEffect
Entered
Number
Effects In
p Value
0Intercept1.
1x820.0381
2x230.0255

Selection stopped because no candidate for entry is significant at the 0.05 level.

Selected Effects:Intercept x2 x8


The DETAILS=ALL option requests further detail information about the steps of the model selection. The "Candidate Details" table in Output 55.1.3 list all candidates for each step in the order of significance of their score tests. The effect with smallest p-value less than the SLE level of 0.05 is added in each step.

Output 55.1.3: Candidate Details

Candidate Entry and Removal
Details
StepRankEffectCandidate
For
p Value
11x8Entry0.0381
 2x2Entry0.0458
 3x4Entry0.0557
 4x9Entry0.1631
 5CEntry0.1858
 6x1Entry0.2715
 7x10Entry0.4434
 8x5Entry0.7666
 9x3Entry0.8006
 10x7Entry0.8663
 11x6Entry0.9626
21x2Entry0.0255
 2x4Entry0.0721
 3x9Entry0.1080
 4CEntry0.1241
 5x1Entry0.2778
 6x10Entry0.5250
 7x5Entry0.6993
 8x7Entry0.7103
 9x3Entry0.8743
 10x6Entry0.9577


The DETAILS=ALL option also produces the "Selection Details" table, which provides fit statistics and the value of the score test chi-square statistic at each step.

Output 55.1.4: Selection Details

Selection Details
StepEffect
Entered
Number
Effects In
Chi-SquarePr > ChiSq-2 LogLAICAICCBIC
0Initial Model1  123.82125.82125.86128.43
1x824.29860.0381119.46123.46123.59128.67
2x234.98820.0255114.40120.40120.65128.21


Output 55.1.5 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 55.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 55.1.5: Fit Statistics and Null Test

Fit Statistics
-2 Log Likelihood114.40
AIC (smaller is better)120.40
AICC (smaller is better)120.65
BIC (smaller is better)128.21

Testing Global Null Hypothesis: BETA=0
TestChi-SquareDFPr > ChiSq
Likelihood Ratio9.423720.0090


The parameter estimates of the selected model are given in Output 55.1.6. 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 55.1.6: Parameter Estimates

Parameter Estimates
ParameterEstimateStandard
Error
DFt ValuePr > |t|
Intercept0.85840.5503Infty1.560.1188
x2-0.25020.1146Infty-2.180.0290
x81.78400.7908Infty2.260.0241


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

and the predicted probability that variable y takes on the value 0 is