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

2024-01-07 Thread Ben Bolker
A little more. As Christopher Ryan points out, as long as the zero-inflation model is non-trivial (i.e. more complex than a single intercept for the whole population), there's a pi(i) for every observation i (you could certainly average the pi(i) values if you wanted, or compute pi for an

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

2024-01-04 Thread Christopher W. Ryan via R-help
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

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

2024-01-04 Thread Sorkin, John
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 p