implement Zero One Inflated Beta (ZIOB) distribution? #19
Replies: 0 comments 6 replies
-
I don't know whether a custom distribution makes sense within the primitives of Pymc. This would be a continuous-discrete mixture and usually Pymc distinguishes between the two for sampling and transformation procedures. I am not even sure that pm.Mixture was explicitly designed to allow for mixtures of distributions with different supports. I am just raising questions here, not giving answers by any means. On the topic itself, I wonder how well/badly a censored normal would deal with this type of data. It avoids both the boundary issues and unlike the ZOIB it would naturally combine both the 0s and 1s into it's mean. |
Beta Was this translation helpful? Give feedback.
-
I think it would depend on the form of the data and the actual data generating process. For example, you could have data where proportions are tightly clustered around 0.5, but then many more observations at 0 and 1 than you'd expect from the tails of the distribution. So a censored normal might do it in some situations, but if the 0's or 1's are actually being generated by a different process from the mean/spread of a normal or beta, then you would need the ZIOB distribution. |
Beta Was this translation helpful? Give feedback.
-
Yeah, I was just thinking in reply to the blog article. I saw that someone on STAN proposed another model based on two latent ordered cutoffs. The ZOIB seems to be the most compartmentalized approach, where there are 3 independent processes going on (no dependence between 0s, beta and 1s as far as I can tell). Do you have any intuition on whether this is a standard model by now or if the "winner" for this type of data is still to be decided? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Thanks for your detailed input. Regardless of what is decided, this would make a great study case for pymc-examples (showing different alternative generative processes for this kind of data) |
Beta Was this translation helpful? Give feedback.
-
Agreed - when I get a chance I'd quite like to put something together on this |
Beta Was this translation helpful? Give feedback.
-
PyMC3 has some zero inflated discrete distributions,
ZeroInflatedBinomial
,ZeroInflatedPoisson
,ZeroInflatedNegativeBinomial
, but no continuous distributions. One very useful one to have would be the Zero One Inflated Beta (ZIOB) distribution - it would allow better estimation of proportions where there are floor and ceiling effects, similarly it would allow for regression for proportion data (beta regression) where you get these floor and ceiling bound issues.It looks like it would be a modest job to hand code a model by splitting the data up into floor/ceiling/proportion data and having separate likelihoods, as in this JAGS implementation (see below). Maybe that is the best way to go, but I wanted to stimulate discussion on whether it would be useful for someone to implement a specific ZOIB distribution? Seems like it would be pretty nice from a user/model-builder perspective. It would also be of use to the GLM module presumably
Useful resources for more information
Beta Was this translation helpful? Give feedback.
All reactions