An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120712/d312f3cc/attachment.pl>
Vuong test
6 messages · Marc Schwartz, sanchez ana
On Jul 13, 2012, at 12:35 AM, sanchez ana wrote:
Dear All, I am using the function vuong from pscl package to compare 2 non nested models NB1 (negative binomial I ) and Zero-inflated model. NB1 <- glm(, , family = quasipoisson), it is an object of class: "glm" "lm" zinb <- zeroinfl( dist = "negbin") is an object of class: "zeroinfl" when applying vuong function I get the following: vuong(NB1, zinb) Error en predprob.glm(m1) : your object of class glm is unsupported by predprob.glmyour object of class lm is unsupported by predprob.glm Any help will be really appreciated.
Either you did not properly copy your code above or something is amiss in your understanding.
NB1 is NOT a negative binomial model, but is a quasipoisson model. The latter is not fit using maximum likelihood, hence the Vuong test, which is a likelihood ratio based test, fails.
If you want a negative binomial model, you should be using glm.nb() in V&R's MASS package:
require(MASS)
NB1 <- glm.nb(...)
Then you can use the Vuong test from pscl.
If you have not, you might want to read:
vignette("countreg")
Regards,
Marc Schwartz
1 day later
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120714/5e8e3cd3/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120714/918b5b04/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120714/c76d7071/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120714/b4b4bb36/attachment.pl>