This can take up quite a bit of space if there are a large number of predictor variables. Note: The argument trace=0 tells R not to display the full results of the stepwise selection. #view results of forward stepwise regression Intercept_only <- lm(mpg ~ 1, data=mtcars)įorward <- step(intercept_only, direction=' forward', scope= formula(all), trace=0) The following code shows how to perform forward stepwise selection: #define intercept-only model ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |