An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090507/07227313/attachment-0001.pl>
Step and stepAIC
9 messages · Peter-Heinz Fox, Jun Shen, Dieter Menne
Peter-Heinz Fox <peterheinzfox <at> yahoo.de> writes:
I???m using "step" and "stepAIC" for stepwise regression. After each step, I would like to make an additional calculation based on the independent variables that have been selected until this step and their corresponding weights. Where do I have to add this calculation?
dropTerm is the toolbox function stepAIC uses; you could use it to build your own stepAIC version. But also make sure you have read http://markmail.org/thread/gk7ysg6tclz4vtdi and consider some lasso variant method instead (this partly answers your second question). Dieter
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090507/a7596301/attachment-0001.pl>
Jun Shen <jun.shen.ut <at> gmail.com> writes:
I also wonder if stepAIC can work with an lme model. I tried. it doesn't for now. Appreciate any comment.
It can, and it displays a nice error message telling you exactly why it did not work if you try out of the box. Check parameter "method" in your lme call. Dieter
Jun Shen <jun.shen.ut <at> gmail.com> writes:
I also wonder if stepAIC can work with an lme model. I tried. it doesn't for now. Appreciate any comment.
It can do it, and it displays a nice error message, as I remember, why it won't do it in the default setting. Check parameter method of your lme call. Dieter
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090507/4c24c393/attachment-0001.pl>
Jun Shen <jun.shen.ut <at> gmail.com> writes:
I changed the "method" to ML for my lme call. Now I get a different error when running the stepAIC Error in terms.formula(formula, data = data) : 'data' argument is of the wrong type What does that mean? The same dataset was used for an lm call and everything is fine to run stepAIC.
Show sessionInfo() (do you have the recent version?) Show str(yourdataset) Show lme(.... your formula) Dieter
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090507/5c4a338f/attachment-0001.pl>
Jun Shen <jun.shen.ut <at> gmail.com> writes:
lme(biomarker~Cmax+AGE,data=cov,method='ML',random=~1+AGE|ID,keep.data=T) Warning message: In lme.formula(biomarker ~ Cmax + AGE, data = cov, method = "ML", : Fewer observations than random effects in all level 1 groups
That's why the posting guide says: tell the whole story. After that warning, expect everything. You want too much from your data. Dieter