Problem with coding a new probability distribution in Greta

Thanks @olivuntu! I’ve added it as a to do here:

Hi @olivuntu !

Would you mind if I incorporated your distributions from your code (e.g., into greta.distributions ? You will be listed as author in the R package :slight_smile:

No worries if you would prefer to do it yourself, I’m just kind of keen to get this incorporated into greta.distributions in the coming weeks.

Cheers! :slight_smile:

Hi @njtierney,

Sorry for the recent statu quo. I’ve just pulled a request to greta-dev just now with the code for the ZI distributions. I have to say, my first pull ever, so you may also want to add the code yourself to greta if that’s more convenient, that’s also fine with me.
For some reason that still escapes me, I could not run the formal test to compare the ZINB distribution with that of extraDistr (function chek_tf_version cannot be found…). That’s why I have not pushed the changes so far.
Otherwise it does the job, and for the story, since all that, I’ve been using greta with a post-doc fellow to fit his nice ecological model of ZINB-distributed seedlings numbers with several hierarchical levels, including an explicative process level of dispersed seeds numbers itself modeled as a multinomial response of higher-level species fruit fecundity and other traits… :exploding_head: It’s really neat to be able to code such things (relatively) simply thanks to greta !! :hugs:

And thanks for the addition to the authors’ list, a pleasure ! Happy to contribute further when possible ! :wink:



1 Like

Thanks so much, @olivuntu!

I’ve posted some instructions on the pull request, but we’ll actually be adding new distributions to

I’m so stoked to hear that you have been able to use ZINB in some cool ecological models!