The HPGENSELECT Procedure

Example 53.1 Model Selection

(View the complete code for this example.)

The following HPGENSELECT statements examine the same data that is used in the section Getting Started: HPGENSELECT 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 that are related to model selection be produced.

The data set getStarted is shown in the section Getting Started: HPGENSELECT Procedure. It contains 100 observations on a count response variable (Y), a continuous variable (Total) to be used in Example 53.3, and five categorical variables (C1–C5), each of which has four numerical levels.

A log-linked Poisson regression model is specified by using classification effects for variables C1–C5. The following statements request model selection by using the forward selection method:

proc hpgenselect data=getStarted;
   class C1-C5;
   model Y = C1-C5 / Distribution=Poisson;
   selection method=forward details=all;
run;

The model selection tables are shown in Output 53.1.1 through Output 53.1.3.

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

The HPGENSELECT 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 53.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 C2 made the most significant contribution to the model among the candidate effects (p < 0.0001). In step 2, the most significant contribution when adding an effect to a model that contains the intercept and C2 was made by C5. In step 3, the variable C1 (p = 0.0496) was added. 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 53.1.2: Selection Summary Information

The HPGENSELECT Procedure

Selection Summary
StepEffect
Entered
Number
Effects In
p Value
0Intercept1.
1C22<.0001
2C53<.0001
3C140.0496

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

Selected Effects:Intercept C1 C2 C5


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

Output 53.1.3: Selection Details

Selection Details
StepDescriptionEffects
In Model
Chi-SquarePr > ChiSq-2 LogLAICAICCBIC
0Initial Model1  350.193352.193352.234354.798
1C2 entered225.7340<.0001324.611332.611333.032343.032
2C5 entered323.0291<.0001303.580317.580318.798335.817
3C1 entered47.83280.0496295.263315.263317.735341.315


Output 53.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 53.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 information criteria AIC, AICC and BIC are smaller than in the full model, indicating a better fit.

Output 53.1.4: Fit Statistics

Fit Statistics
-2 Log Likelihood295.26
AIC (smaller is better)315.26
AICC (smaller is better)317.74
BIC (smaller is better)341.31
Pearson Chi-Square85.0656
Pearson Chi-Square/DF0.9452


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

Parameter Estimates
ParameterDFEstimateStandard
Error
Chi-SquarePr > ChiSq
Intercept10.7754980.24256110.22160.0014
C1 01-0.2112400.2072091.03930.3080
C1 11-0.6855750.2557137.18790.0073
C1 21-0.1276120.2036630.39260.5309
C1 300...
C2 010.9583780.23973115.9817<.0001
C2 110.7385290.2370989.70240.0018
C2 210.2110750.2557910.68090.4093
C2 300...
C5 01-0.8255450.21405414.87430.0001
C5 11-0.6976110.20260711.85550.0006
C5 21-0.5667060.2139617.01530.0081
C5 300...