On Fri, 13 Mar 2009, Tal Galili wrote:
Thanks Thomas. Assuming I want to change the "k" factor (used in AIC type procedures), is there a way to do that ?
There is no "k" factor in the leaps algorithm. It always reports the best model with one predictor, the best model with two predictors, the best model with three predictors, and so on. When comparing models with the same number of predictors the cost-complexity penalty cancels out and so only the residual sum of squares is needed. You can add any other penalty later.
Also - is there a way to force the model to make only one "step" in the creation of the model ?
For forward selection there is: set nvmax to 1, and only models with one variable will be considered. Then use force.in to force in the one variable you selected and set nvmax=2 to consider models with two variables. It might well be just as easy to program this yourself -- the leaps package doesn't seem to be a good fit for what you are trying to do. -thomas Thomas Lumley Assoc. Professor, Biostatistics tlum...@u.washington.edu University of Washington, Seattle ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.