Comparing two models: single gaussian and a mixture of two gaussians

Hey again, I went on a similar journey not so long ago. I found this thread very useful: Various approaches to model comparisons

I’ve personally found that model comparison questions require careful formulation. For example, in your case, you may be asking “given that I know the distribution has 1 or more gaussians, how many should I think there are?”. In which case you have just one model, a Gaussian mixture model, and a special interest in the distribution of the parameter governing the number of components.

RE your specific question, for PPC and PSIS/LOO I think you need the log likelihood and samples from your posterior distribution. This is just a matter of copy/pasting your likelihood function from your model and using it’s _rng counterpart for the samples. The arviz quick start guide has a clear Stan example here: https://arviz-devs.github.io/arviz/notebooks/Introduction.html

2 Likes