Re: [R] Forward stepwise regression using lmStepAIC in Caret

2012-03-05 Thread Dan Putka
Allan, Thank you. I tried to adapt your suggestion to my situation and it still does not work [as an aside, I'm new to R, so I may be overlooking something simple]. Using your example below, I want my lower model to reflect only an intercept (i.e., medv ~ 1), I want my upper model to reflect all

Re: [R] Forward stepwise regression using lmStepAIC in Caret

2012-03-05 Thread Allan Engelhardt
Not sure I really like stepwise variable selection, but the function should work, of course. Compare data(BostonHousing, package = "mlbench") lmFit <- train(medv ~ ., data = BostonHousing, "lmStepAIC", scope = list(lower = ~., upper = ~.^2), direction = "forward") with lmFit <- train(medv ~

[R] Forward stepwise regression using lmStepAIC in Caret

2012-03-04 Thread Dan Putka
I'm looking for guidance on how to implement forward stepwise regression using lmStepAIC in Caret. The stepwise "direction" appears to default to "backward". When I try to use "scope" to provide a lower and upper model, Caret still seems to default to "backward". Any thoughts on how I can make t