[R] Obtaining a value of pie in a zero inflated model (fm-zinb2)

Christopher W. Ryan cry@n @end|ng |rom b|ngh@mton@edu
Thu Jan 4 15:38:06 CET 2024


Are you referring to the zeroinfl() function in the countreg package? If
so, I think

predict(fm_zinb2, type = "zero", newdata = some.new.data)

will give you pi for each combination of covariate values that you
provide in some.new.data

where pi is the probability to observe a zero from the point mass component.

As to your second question, I'm not sure that's possible, for any
*particular, individual* subject. Others will undoubtedly know better
than I.

--Chris Ryan

Sorkin, John wrote:
> I am running a zero inflated regression using the zeroinfl function similar to the model below:
>   
>  fm_zinb2 <- zeroinfl(art ~ . | ., data = bioChemists, dist = "poisson")
> summary(fm_zinb2)
> 
> I have three questions:
> 
> 1) How can I obtain a value for the parameter pie, which is the fraction of the population that is in the zero inflated model vs the fraction in the count model? 
> 
> 2) For any particular subject, how can I determine if the subject is in the portion of the population that contributes a zero count because the subject is in the group of subjects who have structural zero responses vs. the subject being in the portion of the population who can contribute a zero or a non-zero response?
> 
> 3) zero inflated models can be solved using closed form solutions, or using iterative methods. Which method is used by fm_zinb2?
> 
> Thank you,
> John
> 
> John David Sorkin M.D., Ph.D.
> Professor of Medicine, University of Maryland School of Medicine;
> 
> Associate Director for Biostatistics and Informatics, Baltimore VA Medical Center Geriatrics Research, Education, and Clinical Center; 
> 
> PI Biostatistics and Informatics Core, University of Maryland School of Medicine Claude D. Pepper Older Americans Independence Center;
> 
> Senior Statistician University of Maryland Center for Vascular Research;
> 
> Division of Gerontology and Paliative Care,
> 10 North Greene Street
> GRECC (BT/18/GR)
> Baltimore, MD 21201-1524
> Cell phone 443-418-5382
> 
> 
> 
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list