paul-buerkner / brms

brms R package for Bayesian generalized multivariate non-linear multilevel models using Stan
https://paul-buerkner.github.io/brms/
GNU General Public License v2.0
1.27k stars 183 forks source link

Feature request: Delaporte distribution for skewed counts #848

Closed drjhw closed 7 months ago

drjhw commented 4 years ago

I would like to be able to relate the skewness of counts of events in different populations to the proportions of people in those populations who receive exposure to an environmental factor. gamlss provides the Delaporte and Sichel distributions for this purpose. But, I do not know how to make them into custom families in brms (even after reading the recent vignette about how to make the beta-binomial family for brms). Would you please make the Delaporte family available in brms?

paul-buerkner commented 4 years ago

Can you provide some references for these distributions?

drjhw notifications@github.com schrieb am Sa., 8. Feb. 2020, 03:59:

I would like to be able to relate the skewness of counts of events in different populations to the proportions of people in those populations who receive exposure to an environmental factor. gamlss provides the Delaporte and Sichel distributions for this purpose. But, I do not know how to make them into custom families in brms (even after reading the recent vignette about how to make the beta-binomial family for brms). Would you please make the Delaporte family available in brms?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/paul-buerkner/brms/issues/848?email_source=notifications&email_token=ADCW2ADYTS5CBNPZDY7QAPLRBYNZBA5CNFSM4KRXX45KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IL62TJQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCW2AGK5FXCBLPFRHR3GL3RBYNZBANCNFSM4KRXX45A .

drjhw commented 4 years ago

Wikipedia says: "The Delaporte distribution is a discrete probability distribution that has received attention in actuarial science..It can be defined using the convolution of a negative binomial distribution with a Poisson distribution. Just as the negative binomial distribution can be viewed as a Poisson distribution where the mean parameter is itself a random variable with a gamma distribution, the Delaporte distribution can be viewed as a compound distribution based on a Poisson distribution, where there are two components to the mean parameter: a fixed component, which has the λ parameter, and a gamma-distributed variable component, which has the α and β parameters." (https://en.wikipedia.org/wiki/Delaporte_distribution)

There is an R package Delaporte (https://rdrr.io/cran/Delaporte/man/Delaporte.html) and R package gamlss also has code for the Delaporte distribution (https://rdrr.io/cran/gamlss.dist/man/gamlss.family.html)

The Sichel distribution is a Poisson-modified generalized inverse gaussian distribution (Karlis & Xekalaki, 2005 - http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.725.5838&rep=rep1&type=pdf). Zou and colleagues (2015) (http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.682.4358&rep=rep1&type=pdf) have shown that the Sichel distribution fits over-dispersed crash data that are highly skewed because some sites have more crashes.

gamlss has code for two parameterizations of the Sichel distribution (https://rdrr.io/cran/gamlss.dist/man/gamlss.family.html) and refers to a paper at https://www.econstor.eu/bitstream/10419/101068/1/747575800.pdf which does not actually include the Sichel distribution, but might be of interest to you in that it has a lot about Bayesian models for over-dispersed count data

paul-buerkner commented 7 months ago

Closing this issue for now to reduce the load of the issue tracker. These distributions can be readily implemented as a custom family. If someone has time and wants to work on them as built-in families, feel free to write here and I am happy to reopen.