[R] Stepwise procedure with force.in command

Hien Nguyen hien.nmsu at gmail.com
Mon Apr 9 09:44:15 CEST 2012


Dear R-helpers,

I am trying to do a stepwise procedure in which I want to force some 
variables in the model. I have searched around and it seems that only 
leaps package allows to force the variable in the stepwise procedure. I 
use the leaps package and use the regsubsets(lm1, force.in = 1, data) to 
force 1 variable in the model. However, the force.in command only allow 
me to force 1 variable in. I want to force several variables in the 
procedure. How could I force them in?

Thanks a lot,

Hien



More information about the R-help mailing list