I'm looking into calculating a Pseudo $R^2$ used McFadden's method for a zero-inflated negative binomial regression. I'm unclear how to go about evaluating $\hat L(M_{intercept})$ in R. Any suggestions for how this might be easily done?

R Code thus far:

> require(pscl)
> require(MASS)
> ZerInflNegBinRegress<-zeroinfl(y~.|x+z, data=DATASET, dist="negbin", EM=TRUE)

Which returns the Log Likelihood for the model using the summary function. It's finding the Log Likelihood for an intercept only function that I'm unsure of.

  • $\begingroup$ Can you show code and a reproducible example for what you did? That way it's easier for someone to modify it. $\endgroup$ – Jeremy Miles Aug 14 '13 at 17:51
  • $\begingroup$ Unfortunately I'm working with highly confidential information, so I really cannot. I'll throw in the basic GLM syntax, if that helps anyone who is unfamiliar with it. $\endgroup$ – Carly Aug 14 '13 at 17:55
  • $\begingroup$ Just generate some random numbers. glm() in R doesn't do negative binomial (does it?), so I'm not exactly sure what you're doing. $\endgroup$ – Jeremy Miles Aug 14 '13 at 17:59
  • $\begingroup$ The call glm.nb in R does, however the zero-inflated code I used is above. Any information in it, I found here: ats.ucla.edu/stat/r/dae/zinbreg.htm $\endgroup$ – Carly Aug 14 '13 at 19:30

I just found the answer to this:

InterceptModel <- update(ZerInflNegBinRegress, . ~ 1) 

Super easy!! Thanks for the help!!

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.