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

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

My Y$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$k$, and the second the MASSMASS package is estimating a value of k$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)

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)

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)
Bumped by Community user
Bumped by Community user
Bumped by Community user
Tweeted twitter.com/StackStats/status/919895664162754560
edited tags
Source Link
Stephan Kolassa
  • 130.8k
  • 22
  • 264
  • 497

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

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

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)
Source Link
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