Make sure you understand the commands you are typing below. Stop to ask the TAs.
For illustration, we will look at main effects in the gender discrimination data. Perform a sequential model selection procedure using the "stepwise" procedure under the "Regression" menu. Your largest model would be: log(sal77)~senior+age+educ+exper.
attach(Case1202)
stepwise(cbind(senior,age,educ,exper),log(sal77), f.crit=c(4,2),method="efroymson")
The stepwise procedures will add a predictor that meets 3 equivalent criteria:
Note f.crit above: This must be a numerical value (or vector of 2 values) that specify the F value(s) to be used as criteria for adding or deleting variables to/from the subset when using Efroymson's method. If two values are provided, the first is the F-to-enter and the second is the F-to-delete.
Now we will look at methods to perform all subset selection on the gender discrimination data. As written in Section 12.6, we begin by examining salary on the log scale, and a "saturated second order model" is chosen to start.
Looking at main effects only, we have log.bsal~senior+educ+exper, log.bsal~senior+educ, log.bsal~senior+age+educ+exper. For exploration of interactions and second order effects, we'll keep the four main effects, keeping in mind that we may want to examine whether age effects and experience effects (combined with their related interaction and squared terms) belong in the model later on.
Last modified: Tue Mar 23 18:09:58 EST 2004