The 'final model' returned by stepAIC is just a model fit, so you do this
the same way as any fit. I'll assume you want to know for lm() fits, but
this is fairly general.
library(MASS)
example(stepAIC)
formula(quine.stp)
attr(terms(quine.stp), "term.labels")
(You are making a habit of asking
Hello there. I uses the following codes for the purpose of variable
selection.
> lmModel <- lm(y~.,data.frame(y=y, x=x))
> step <- stepAIC(lmModel, direction="both")
> step$anova
Stepwise Model Path
Analysis of Deviance Table
Initial Model:
y ~ x.Market.Price + x.Qua
2 matches
Mail list logo