Skip to main content
3 of 3
added 3 characters in body; edited title
Ben Bolker
  • 47.3k
  • 3
  • 130
  • 182

Compare glm.nb vs glm(..., negative.binomial(k), ..) models

My $Y$ is a count variable and I am estimating it using a negative binomial function. I am not sure how I can decide which model is better. In the first model I am selecting a value for $k$, and the second the MASS package is estimating a value of $k$ for me.

Will

anova(mod1, mod2, test="Chisq") 

work?

If so, which model is the null referring to?

Otherwise, is there a better way to decide which model is better?

library(MASS)
mod1<- glm(Y ~ X1 + X2 + X3, negative.binomial(1), myData)
mod2<- glm.nb(Y ~ X1 + X2 + X3, myData)
Travis
  • 781
  • 1
  • 8
  • 15