This example demonstrates two algorithms of automatic variable selection in the COUNTREG procedure. Automatic variable selection
is most effective when the number of possible candidates for explaining the variation of some variable is large. For clarity
of exposition, this example uses only a small number of variables. The data set Article
published by Long (1997) contains six variables. (This data set is also used in ZIP and ZINB Models for Data That Exhibit Extra Zeros.) The dependent variable Art
records the number of articles that were published by a doctoral student in the last three years of his or her program. Explanatory
variables include sex of the student (Fem
), marital status (Mar
), number of children (Kid5
), prestige of the program (Phd
), and publishing activity of the academic adviser (Ment
). All these variables intuitively suggest their affect on the students’ primary academic output.
First, for comparison purposes, estimate the simple Poisson model. The choice of model is specified by DIST= option in the MODEL statement, as follows:
proc countreg data = long97data; model art = fem mar kid5 phd ment / dist = poisson; run;
The output of these statements is shown in Output 11.3.1.
Output 11.3.1: Poisson Model for the Number of Published Articles
Parameter Estimates | |||||
---|---|---|---|---|---|
Parameter | DF | Estimate | Standard Error |
t Value | Approx Pr > |t| |
Intercept | 1 | 0.304617 | 0.102982 | 2.96 | 0.0031 |
fem | 1 | -0.224594 | 0.054614 | -4.11 | <.0001 |
mar | 1 | 0.155243 | 0.061375 | 2.53 | 0.0114 |
kid5 | 1 | -0.184883 | 0.040127 | -4.61 | <.0001 |
phd | 1 | 0.012823 | 0.026397 | 0.49 | 0.6271 |
ment | 1 | 0.025543 | 0.002006 | 12.73 | <.0001 |
Note that the Newton-Raphson optimization algorithm took five steps to converge. All parameters, except for one, are significant
at a 1% or 5% level, whereas Phd
is not significant even at the 10% level.
In this case, it might be easy to identify the variables that have limited explanatory power. However, if the number of variables were large, the manual selection could be time-consuming and inaccurate. For a large number of variables, you would be better off in applying one of the automatic algorithms of variable selection. The following statements use the penalized likelihood method, which is indicated by SELECT=PEN option in the MODEL statement:
proc countreg data = long97data method = qn; model art = fem mar kid5 phd ment / dist = poisson select = PEN; run;
The output of these statements is shown in Output 11.3.2.
The "Parameter Estimates" table shows that the variable Phd
was dropped from the model.
The next statements use the information criterion by specifying the SELECT=INFO option. The direction of the search is chosen to be forward, and the information criterion is AIC. In order to achieve the same selection of variables as for the penalized likelihood method, 0.001 is specified for the percentage of decrease in the information criterion necessary for the algorithm to stop.
proc countreg data = long97data; model art = fem mar kid5 phd ment / dist = poisson select = INFO ( direction = forward criter = AIC lstop = 0.001 ); run;
The output of these statements is shown in Output 11.3.3.
Output 11.3.3: Poisson Model for the Number of Published Articles with Search Method Using Information Criterion
From the output, it is clear that the same set of variables was chosen as the result of information criterion algorithm. Note that the forward optimization algorithm starts with the constant as the only explanatory variable.