I'm running a step regression and I'd like to extract the final formula to use it in another regression.
Using this example:
lm1 <- lm(Fertility ~ ., data = swiss)
slm1 <- step(lm1)
I would expect to be able to assign this to a formula object:
Fertility ~ Agriculture + Education + Catholic +
Infant.Mortality