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 9.1.1 through Output 9.1.4.
The "Selection Information" table in Output 9.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.
The "Selection Summary" table in Output 9.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.
The DETAILS=ALL option requests further detail information about the steps of the model selection. The "Candidate Details" table in Output 9.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 9.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 9.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 9.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.
The parameter estimates of the selected model are given in Output 9.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.
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