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 ~