glm.nb, anova.negbin
Yes, that appears to fix the problem, at least in the snippet of code I sent. Thanks Brian ... Ben Bolker
On Wed, 26 Sep 2001, Prof Brian Ripley wrote:
On Wed, 26 Sep 2001, Jari Oksanen wrote:
juli at ceam.es said:
Error in get(x, envir, mode, inherits) : invalid first argument In addition: Warning message: tests made without re-estimating theta in: anova.negbin(t2) >
I looked quickly, and it seems that this error comes actually from
`anova.glm' and from the following `get':
if (!is.function(method))
method <- get(method, mode = "function")
`anova.negbin' sends the `negbin' `object' to `anova.glm', but the
negbin object does not have a method (`glm' objects have method
"glm.fit"). There seem to be some other differences in `negbin' and
`glm' objects, so that `anova.glm' can't handle them (e.g., glm.control
object is missing in `negbin' object).
I would like to help, but I don't have time now (got to mark exams).
Yes, that's it: R is incompatible with S. Although the information
is in the saved call, R uses a duplicate copy. In glm.nb() adding
fit$method <- method
fit$control <- control
at the end seems to fix it, but without an example I can reproduce,
I cannot of course be sure.
And that was my main point: if reporting problems *please* report the
results of traceback(), and if possible a small reproducible example.
318 Carr Hall bolker at zoo.ufl.edu Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker Box 118525 (ph) 352-392-5697 Gainesville, FL 32611-8525 (fax) 352-392-3704 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._