# Calculate pseudo-$R^2$ from R's zero-inflated negative binomial regression

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.

• Can you show code and a reproducible example for what you did? That way it's easier for someone to modify it. – Jeremy Miles Aug 14 '13 at 17:51
• 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. – Carly Aug 14 '13 at 17:55
• 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. – Jeremy Miles Aug 14 '13 at 17:59
• 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 – Carly Aug 14 '13 at 19:30

InterceptModel <- update(ZerInflNegBinRegress, . ~ 1)