0

I'm using function glm.nb() from the package MASS in R. How do I find the correct init.theta value? In other questions I've seen on this topic, askers already seemed to have their init.theta.

I understand that theta is a dispersion parameter. When I don't enter init.theta, the summary shows me ridiculously high theta and standard error values. The code runs but gives me an error message saying I reached the theta.ml iteration limit.

I've tinkered around and added init.theta = 1 which gave me a lower theta, standard error, and p-value. I still don't really understand what this argument means though.

Mock up of the code I'm using:

  glm.nb(measurement ~ year, data = df, init.theta = 1, link = log)
Cait
  • 1
  • 3
    Is there any chance we can have a [mcve]? Or at least the output of `summary(data)` and `summary(fitted_model)` ? (Include this information as *text* (within a code block) in your question ...) – Ben Bolker Jul 02 '21 at 22:28
  • 3
    Chances are that you have data that are either very close to equidispersed (var=mean, i.e. Poisson) or even underdispersed (var – Ben Bolker Jul 02 '21 at 22:56

0 Answers0