The HPLOGISTIC Procedure

Example 54.1 Model Selection

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 54.1.1 through Output 54.1.4.

The "Selection Information" table in Output 54.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 54.1.1: Selection Information

The HPLOGISTIC Procedure

Selection Information
Selection Method Forward
Select Criterion Significance Level
Stop Criterion Significance Level
Effect Hierarchy Enforced None
Entry Significance Level (SLE) 0.05
Stop Horizon 1



The "Selection Summary" table in Output 54.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 54.1.2: Selection Summary Information

Selection Summary
Step Effect
Entered
Number
Effects In
p Value
0 Intercept 1 .
1 x8 2 0.0381
2 x2 3 0.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 54.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 54.1.3: Candidate Details

Candidate Entry and Removal
Details
Step Rank Effect Candidate
For
p Value
1 1 x8 Entry 0.0381
  2 x2 Entry 0.0458
  3 x4 Entry 0.0557
  4 x9 Entry 0.1631
  5 C Entry 0.1858
  6 x1 Entry 0.2715
  7 x10 Entry 0.4434
  8 x5 Entry 0.7666
  9 x3 Entry 0.8006
  10 x7 Entry 0.8663
  11 x6 Entry 0.9626
2 1 x2 Entry 0.0255
  2 x4 Entry 0.0721
  3 x9 Entry 0.1080
  4 C Entry 0.1241
  5 x1 Entry 0.2778
  6 x10 Entry 0.5250
  7 x5 Entry 0.6993
  8 x7 Entry 0.7103
  9 x3 Entry 0.8743
  10 x6 Entry 0.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 54.1.4: Selection Details

Selection Details
Step Effect
Entered
Number
Effects In
Chi-Square Pr > ChiSq -2 LogL AIC AICC BIC
0 Initial Model 1     123.82 125.82 125.86 128.43
1 x8 2 4.2986 0.0381 119.46 123.46 123.59 128.67
2 x2 3 4.9882 0.0255 114.40 120.40 120.65 128.21



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

Fit Statistics
-2 Log Likelihood 114.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
Test Chi-Square DF Pr > ChiSq
Likelihood Ratio 9.4237 2 0.0090



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

Parameter Estimates
Parameter Estimate Standard
Error
DF t Value Pr > |t|
Intercept 0.8584 0.5503 Infty 1.56 0.1188
x2 -0.2502 0.1146 Infty -2.18 0.0290
x8 1.7840 0.7908 Infty 2.26 0.0241



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

\[ \widehat{\eta } = 0.8584 - 0.2503 \times x_2 + 1.7840 \times x_8 \]

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

\[ \widehat{\mr{Pr}}(Y = 0) = \frac{1}{1+\exp \{ - \widehat{\eta } \} } \]