[R] glm.nb, anova.negbin

juli g. pausas juli at ceam.es
Wed Sep 26 09:08:00 CEST 2001


> >
> > Any suggestion of why I'm getting this error?
>
> Because there is a copying error in lines
>
>     cat("\n              Theta: ", format(round(x$theta, dp, nsmall=dp)),
>         "\n          Std. Err.: ", format(round(x$SE.theta, dp,
> nsmall=dp)),
>         "\n")
>     if(!is.null(x$th.warn))
>         cat("Warning while fitting theta:", x$th.warn,"\n")
>     cat("\n 2 x log-likelihood: ", format(round(x$twologlik, 3,
> nsmall=dp)), "\n
>
> Move the second ) before the nsmall.
>
> Or just use the debugging tools to find it ....
>

Thank you very much.
Also, it seems to me that anova.negbin is not working properly  when testing a
single model (although the help suggest that it can be used for a single model
too). I have no problem when comparing different fitted models.

> t <- glm.nb(tax ~ areal)
> t2 <- update(t, .~. + tanual)
> anova(t, t2)  # OK
[...]
> anova(t2)
Error in get(x, envir, mode, inherits) : invalid first argument
In addition: Warning message:
tests made without re-estimating theta in: anova.negbin(t2)

Any other suggestion? Many thanks

Juli


> --
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

--
Juli G. Pausas   (Mr)
Centro de Estudios Ambientales del Mediterraneo (CEAM)
C/ C.R. Darwin 14, Parc Tecnologic,
46980 Paterna, Valencia, SPAIN
Tel: (+ 34) 96 131 8227; Fax: (+ 34) 96 131 8190
mailto:juli at ceam.es
http://www.gva.es/ceam

GCTE Fire Network - http://www.gva.es/ceam/FireNetwork


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 mailing list