Question: Apply a three-group discrete mixture model to the baseball average data. A two group mixture, with code as below, gives an LPML (for the original
Apply a three-group discrete mixture model to the baseball average data. A two group mixture, with code as below, gives an LPML (for the original data) of -726.5 , with plots of \(p_{\text {new }}\) suggesting some bimodality - though the posterior predictive criterion regarding maximum \(p_{\text {new }}\) is still approaching 0.9 .
![model for (i in 1:380) (y[i] ~dbin (p[G[i]],n[i]); #latent groups G[i] dcat](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1711/0/0/9/29465fbee0e69c561711052461358.jpg)
model for (i in 1:380) (y[i] ~dbin (p[G[i]],n[i]); #latent groups G[i] dcat (pi [1:2]) ynew [i] ~dbin (p [G[i]],n[i]); pnew [i]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
