Skip to content
Prev 311475 / 398513 Next

Stepwise analysis with fixed variables

On Nov 21, 2012, at 6:41 AM, Einat <einatgranot at gmail.com> wrote:

            
First, I strongly suggest that you search on the problems associated with using stepwise regression and alternative approaches. This subject has been discussed ad infinitum on this list and is not a reasonable approach to covariate selection.

To your first question, which Uwe replied to and which I thought was pretty clear:

  scope = list(upper = ~ sex + BMI + height + weight + education + ses, 
               lower = ~ sex + height)

It is described in the Details section of ?step and there is an example of this in ?stepAIC in V&R's MASS package, which is a default part of R and is linked in the See Also section of ?step.

To your second question, you can't. It uses AIC and this has also been discussed frequently on this list. You might look at Frank's fastbw() function in his 'rms' package on CRAN.

Regards,

Marc Schwartz