Dear Dr. Schwartz,
 
Thanks so much
 
Ana


>________________________________
> De: Marc Schwartz <marc_schwartz@me.com>
>Para: sanchez ana <paolas25mx@yahoo.com.mx> 
>CC: "r-help@R-project.org" <r-help@r-project.org> 
>Enviado: Viernes, 13 de julio, 2012 7:36:26
>Asunto: Re: [R] Vuong test
>  
>
>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
>
>
>
>   
	[[alternative HTML version deleted]]

