Displaying 1 result from an estimated 1 matches for "waterusage".
2003 May 08
2
Forward Stepwise regression with stepAIC and step
...ctions step or stepAIC to perform forward
or stepwise regression as I expect. I have enclosed the example data in
a dataframe at the end of this mail. Note rubbish is and rnorm(17) variable
which I have deliberately added to the data to test the stepwise procedure.
I have used
wateruse.lm<-lm(waterusage~.,data=wateruse) # Fit full model
wateruse.lm.back<-stepAIC(wateruse.lm,trace=FALSE)
in which rubbish is removed (calling wateruse.lm.back$anova gives
Step Df Deviance Resid. Df Resid. Dev AIC
1 NA NA 11 743720.8 193.6655
2 - rubbish 1 76.67448...