I am in need of using the cumulative density functions from either the zero inflated Poisson or zero inflated negative binomial. The methods ask that you supply:
pstr0:
Probability of a structural zero (i.e., ignoring the Poisson distribution), called phi.
The default value of phi = 0 corresponds to the response having an ordinary Poisson distribution.
http://search.r-project.org/library/VGAM/html/zipoisUC.html
What sort of heuristic might I use to estimate this or perhaps solve for it?
I am thinking that if this is a way to simulate pstr0 then it must be the case that pstr0 is just the % of zeros in my data set.
For example:
# libraries
library(VGAM)
library(pscl)
# generate zero inflated poisson data, rate of 5, probability of structural zeros .2
arr1 <- rzipois(n=100, lambda=5, pstr0=0.2)
# fit a model with intercept
m1 <- zeroinfl(arr1 ~ 1)
# predict zeros
mean(predict(m1, type='zero')) # 0.18%
prop.table(table(arr1)) # 0.19%
fitdistrplus), which will give you an estimate of the proportion you're looking for. – Izzy Dec 21 '20 at 19:58pstr0shouldn't just be the % of zeros in your dataset, because some of the zeros in your dataset would be coming directly from the pre-inflation Poisson distribution. – fblundun Dec 21 '20 at 21:36pstr0to 0. Given that I think I have sampled zeros AND structural zeros, I am trying to figure out how I might estimate the extent of my structural zeros, so as to get the correct cumulative density function fromrzipois. The simulation was just a test and seemed consistent with what a data set might look like by generating some y data distributed zero inflated poisson. – John Stud Dec 21 '20 at 22:12