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.Quantity + x.Country + x.Incoterm + x.Channel +
       x.PaymentTerm

   Final Model:
   y ~ x.Quantity + x.Country + x.Incoterm + x.PaymentTerm

                 Step Df Deviance Resid. Df Resid. Dev      AIC
   1                                   1067   852257.2 7268.945
   2      - x.Channel  1 127.9724      1068   852385.2 7267.108
   3 - x.Market.Price  1 858.2886      1069   853243.5 7266.200
   question:
   Now, $anova list the final model only on the console.  How do I retrieve the
   variable names of final model (to be written into a text file later)?
   Thanks.
   ----
   Chua Siang Li
   Consultant - Operations Research
   Acceval Pte Ltd
   Tel: 6297 8740
   Email: [EMAIL PROTECTED]
   Website: www.acceval-intl.com
   This message and any attachments (the "message"...{{dropped:13}}
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to