Thank you very much for the answer, it helped me a lot!
Regards,
Sabine Woschitz
Original-Nachricht
> Datum: Sat, 12 Feb 2011 01:04:46 -0800 (PST)
> Von: "Matthieu Lesnoff [via R]"
>
> An: sabwo
> Betreff: Re: Comparison of glm.nb and negbin from the package aod
>
>
> D
Dear Sabine
In negbin(aod), the deviance is calculated by:
# full model
logL.max <- sum(dpois(x = y, lambda = y, log = TRUE))
# fitted model
logL <- -res$value
dev <- -2 * (logL - logL.max)
(the log-Lik contain all the constants)
As Ben Bolker said, whatever the formula used for deviance, diff
sabwo gmx.at> writes:
[big snip; comparing aod::negbin and MASS::glm.nb fits]
> The thing i really dont understand is why there is such a big difference
> between the deviances? (glm.nb = 30.67 and negbin=52.09?) Shouldnt they be
> nearly the same??
>
I don't have time to dig into this right
I have fitted the faults.data to glm.nb and to the function negbin from the
package aod. The output of both is the following:
summary(glm.nb(n~ll, data=faults))
Call:
glm.nb(formula = n ~ ll, data = faults, init.theta = 8.667407437,
link = log)
Deviance Residuals:
Min 1Q Media
4 matches
Mail list logo