Hi, I'm fitting a glm to a dataset...> objects()[1] "pop.div.full" "speciation.data" ...and then performing model simplification to give a series of model objects all of which have a common suffix.> objects()[1] "pop.div.full" "pop.div.gp.f.b.hm" [3] "pop.div.gp.fb.hm" "pop.div.same.slopes" [5] "speciation.data" I am using anova(model1, model2...) to test the significance of term deletion within the series of models. Is there any way to pass objects() called with a pattern to anova(). i.e something like...> anova(list = objects(pattern="pop.div"),test="Chisq")instead of> anova(pop.div.full, pop.div.gp.f.b.hm, pop.div.gp.fb.hm, >pop.div.same.slopes,test="Chisq")OK, in this example it isn't a lot of typing/cut and paste but it could be quite handy if there is a simple way of doing it, particularly when I have more than one set of full model and simplifications with different prefixes or with larger models with more simplifications. Any suggestions gratefully received. Thanks, David Orme> R.version_ platform ppc-apple-macos arch ppc os MacOS system ppc, MacOS status major 1 minor 5.0 year 2002 month 04 day 29 language R -- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Tue, 28 May 2002, David Orme wrote:> Hi, > > I'm fitting a glm to a dataset... > > > objects() > [1] "pop.div.full" "speciation.data" > > ...and then performing model simplification to give a series of model > objects all of which have a common suffix. > > > objects() > [1] "pop.div.full" "pop.div.gp.f.b.hm" > [3] "pop.div.gp.fb.hm" "pop.div.same.slopes" > [5] "speciation.data" > I am using anova(model1, model2...) to test the significance of term > deletion within the series of models. Is there any way to pass > objects() called with a pattern to anova(). i.e something like... > > > anova(list = objects(pattern="pop.div"),test="Chisq") > > instead of > > > anova(pop.div.full, pop.div.gp.f.b.hm, pop.div.gp.fb.hm, > >pop.div.same.slopes,test="Chisq") > > OK, in this example it isn't a lot of typing/cut and paste but it > could be quite handy if there is a simple way of doing it, > particularly when I have more than one set of full model and > simplifications with different prefixes or with larger models with > more simplifications. Any suggestions gratefully received.Use do.call. Something like do.call("anova", c(as.list(objects(pattern="pop.div")), list(test="Chisq"))) -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Maybe Matching Threads
- Simulate p-value in lme4
- mixed model random interaction term log likelihood ratio test
- odfWeave - merged table cells, and adding information like totals and p-values
- Missing interaction effect in binomial GLMM with lmer
- Adding regression lines to each factor on a plot when using ANCOVA