Dear R fans,
I am trying to do step-wise linear regression using the F-test to decide
which variables to admit. Ewout Steyerberg suggests using the F-test for
this purpose.
I first build a model using no variables using lm(y ~ 1) and then using one
variable that is a strong predictor using lm(y ~ x). When I call var.test
on these two models, I do not get a significant p-value0.07. But a summary
of the second model gives a F-test p-value that is very small.
My questions are:
Should I be using var.test to run the F-test to decide which variable to add
next?
What is the difference between the F-test run by var.test and summary.lm?
Has step-wise model building using the F-test been programmed already?
Thanks!
Troy
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.