You need to specify a Stan model that marginalizes over the latent binary indicator. Here’s a post with example code for the zero-inflated Poisson case
Hi @jeffreypullin
I still feel fundamentally positive about this–nice work!
I do still worry that the current draft will mislead people in practice. Recall that the users guide is going to be read, and translated into applied statistical practice, by people who don’t necessarily have much background in math or probability. Perhaps I am oversensitive precisely because I very nearly made (a mistake analogous to) the following mistake a while back in my own applied work:
Suppose I am a Stan us…
Here’s @mbjoseph 's super helpful tutorial on marginalization:
Everything you might have been afraid to ask about implementing models with
discrete parameters in Stan. Written for ecologists that know BUGS, JAGS, or NIMBLE, and want to use Stan. Provides an example by marginalizing
over partly observed...