James C. McGrath
2010-Mar-02 05:11 UTC
[R] Forced variable retention in regsubsets in 'leaps' package
Hi, In working with model selection algorithms in other stats packages, there are often the following type of selection procedures: 1) Forward selection: Variables are added one at a time, starting with the most significant [according to your selection criterion.] Variables are not removed. 2) Stepwise selection: Like forward selection, but at each stage, variables can be dropped or added. . . etc. The regsubsets function in leaps offers a) exhaustive search, b) forward selection, c) backward selection or d) sequential replacement. I thought forward would work according to definition 1) above, but I am pretty sure I have encountered a situation where, for example: The one-factor model includes variable A The two-factor model includes variables D, E The three-factor model included variables C,D,E . . etc. Is there a way to coerce the behavior in definition 1? That is, if the best one factor model contains A, all multi-factor variants will also? In other words, variables will be added but never removed? Thank you very much. James C. McGrath [[alternative HTML version deleted]]