2
$\begingroup$

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.

$\endgroup$
4
  • $\begingroup$ Can you show code and a reproducible example for what you did? That way it's easier for someone to modify it. $\endgroup$ Commented Aug 14, 2013 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
    Commented Aug 14, 2013 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$ Commented Aug 14, 2013 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
    Commented Aug 14, 2013 at 19:30

1 Answer 1

1
$\begingroup$

I just found the answer to this:

InterceptModel <- update(ZerInflNegBinRegress, . ~ 1) 
logLik(InterceptModel)

Super easy!! Thanks for the help!!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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