So I understand how to do a stepwise regression, for instance:
fit <- step(lm(y~x, data=df)
Is there a way to create a loop that would work as follows:
- stepwise regression - call it "fit"
- re-run stepwise regression excluding coefficients > 1,000 from "fit"
- continue process until all coefficients are <= 1,000