greta-dev / greta.distributions

Extends the distributions offered in greta
Other
1 stars 2 forks source link

hurdles and zero inflated distributions #20

Open njtierney opened 7 months ago

njtierney commented 7 months ago

After discussing with Francis Hui, the key ideas are as follows:

hrlai commented 7 months ago

Great to see continued interest in this module! Just want to quickly refer back to #15 and #17 . Both PRs indeed parameterise zero inflation like you and Francis described above, e.g.:

https://github.com/greta-dev/greta.distributions/blob/6a6ab7b59c9e817b5f75f4072e0f9ef4c53a804e/R/zero_inflated_negative_binomial.R#L51-L54

Also to note that in glmmTMB the distribution families with truncated_* prefixes are for hurdle models, i.e., they are truncated at 1. I think this is their design philosophy. Also note that Francis' boral package has the zero-truncated version of Poisson and negative binomial: https://rdrr.io/cran/boral/man/about.distributions.html as family = zt*

Hopefully these notes help to tidy up things.

njtierney commented 7 months ago

Thanks for that, @hrlai !

We've got a few other priorities at the moment with getting TF2 greta onto CRAN and the variety of issues around that. Hopefully that goes ahead quickly and I can focus my attention on this. Really keen to make it easy to add new and useful distributions to greta!