How to create Data frame with Step wise regression outputs? And how to rank variables in order of ranking in Stepwise Regression
Tried this, not working:
y.data.frame=data.frame(y=rnorm(20),foo=rnorm(20), bar=rnorm(20),baz=rnorm(20))
min.model = lm(A$Y~A$X2+A$X4+A$X3+A$X1+A$X5, data=my.data.frame)
biggest <- formula(lm(A$Y~A$X2+A$X4+A$X3+A$X1+A$X5, data=my.data.frame))
summary(biggest)
A$Y ~ foo + bar + baz fwd.model = step(min.model, direction='forward', scope=biggest)
K= lm(A$Y~A$X1+A$X2+A$X3+A$X4+A$X5)
summary(K)
View(K)