[R] passing model objects to anova()
d.orme at ic.ac.uk
Tue May 28 12:46:23 CEST 2002
I'm fitting a glm to a dataset...
 "pop.div.full" "speciation.data"
...and then performing model simplification to give a series of model
objects all of which have a common suffix.
 "pop.div.full" "pop.div.gp.f.b.hm"
 "pop.div.gp.fb.hm" "pop.div.same.slopes"
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")
> anova(pop.div.full, pop.div.gp.f.b.hm, pop.div.gp.fb.hm,
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.
system ppc, MacOS
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
More information about the R-help