0

Can anybody show me, how to find a CI to Dispersion parameter of negbin distribution in R?

Iknow how to calculate the point estimate but I do not know how to find the confidence interval

so, what is the IC for this example: enter link description here

albert
  • 313

1 Answers1

2

The theta parameter is not part of the main model parameters in glm.nb (as extracted by coef()) but it is treated as a nuisance parameter. However, the fitted model object contains the parameter estimate ($theta) and its standard error ($SE.theta). So you can easily employ a Wald confidence interval based on the asymptotic normal distribution (essentially +/- two standard errors).

library("MASS")
a <- glm.nb(Days ~ Eth + Sex, data = quine)
a$theta + qnorm(c(0.025, 0.975)) * a$SE.theta
## [1] 0.8872956 1.4555238
Achim Zeileis
  • 15,515
  • 2
  • 38
  • 62