Finite and Infinite Mixtures of GLMs

124 views
Skip to first unread message

Martin

unread,
Feb 4, 2016, 9:33:30 AM2/4/16
to Stan users mailing list
Hi,

I'm looking for example code of a finite mixture of two (e.g. Gamma/Normal) GLMs in STAN:
f_mix = pi * Gamma(x | a,b) + (1-pi) * Normal(x | m, s)

where p, a, b, m, s, and all parameters beta are estimated.

Furthermore, is it possible in STAN to model _infinite_ mixtures where the number of components pi_i is unknown
but limited to a maximum value (so not really infinite ;))? I heard this can be done with a dirichlet stick-breaking process,
but I don't know how.
I would also appreciate some example code for that.

Thanks

Bob Carpenter

unread,
Feb 4, 2016, 3:02:54 PM2/4/16
to stan-...@googlegroups.com



> On Feb 4, 2016, at 9:33 AM, Martin <wel...@gmail.com> wrote:
>
> Hi,
>
> I'm looking for example code of a finite mixture of two (e.g. Gamma/Normal) GLMs in STAN:
> f_mix = pi * Gamma(x | a,b) + (1-pi) * Normal(x | m, s)
>
> where p, a, b, m, s, and all parameters beta are estimated.

Works the same way as other mixtures. See the manual
chapter on mixture models.

> Furthermore, is it possible in STAN to model _infinite_ mixtures where the number of components pi_i is unknown
> but limited to a maximum value (so not really infinite ;))? I heard this can be done with a dirichlet stick-breaking process,
> but I don't know how.

Yes, the Dirichlet process is the limit of the finite Dirichlet
case as the number of components goes to infinity. Just use a standard
Dirichlet and set the number of components above your max. You don't
need to code up the stick-breaking process yourself!

> I would also appreciate some example code for that.

We don't have that. I think there's a recent BUGS example
that'd be easy to translate, but it's literally just a matter of
using a large-K, low-alpha Dirichlet prior.

- Bob
Reply all
Reply to author
Forward
0 new messages