Skip to main content
1 of 3
Travis
  • 781
  • 1
  • 8
  • 15

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

My Y is a count variable and I am estimating it using a negative binomial link 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)

Thanks for looking

Travis
  • 781
  • 1
  • 8
  • 15