brms icon indicating copy to clipboard operation
brms copied to clipboard

add order="theta" in mixture()

Open maugavilla opened this issue 2 years ago • 2 comments

Hi

I have been trying to fit LCA and LPA type of models with brms, and for continuous indicators I can make it work with mixture(gaussian, gaussian, order="mu") But when I test this with larger number of mistures, or categorical inicators, this constraint still gives me bimodal posteriors.

I modify the exported syntax from mixture(gaussian, gaussian, order="none") to constraint the mixture proportions to be ordered. This helped with at least a couple of examples. Following the thread https://discourse.mc-stan.org/t/ordered-simplex/1835/2

From the brms syntax, made these edits

  • remove theta from the parameters block, and the respective called to target
  • added this

` transformed parameters { // mixing proportions simplex[2] theta = lambda / sum(lambda); // mixing proportions .. }

model { .. target += gamma_lpdf(lambda | con_theta, 1); ... } `

Was wondering if this could be added as as a constraint for mixture(, order="theta")

Thanks

maugavilla avatar Apr 05 '22 09:04 maugavilla

Thanks for opening this issue! Is ordering the thetas a common approach? Is it explored theoretically somewhere?

paul-buerkner avatar Apr 05 '22 11:04 paul-buerkner

I am not sure how common it is, but have seen different authors mentioned it as an option of the identification constraints that can help with label switching.

In these book they discuss several option on how to handle this label switching. One of them are constraining the order of some parameters, like the mixing proportions, or predicted probabilities. They say that one of the constraints should be enough

Like Sara Depaoli in her new book. Bayesian structural equation modeling. Sarah Depaoli. Description: New York, NY : TheGuilford Press, 2021. | Series: Methodology in the social sciences

Also in chapter 13 of Levy, R., & Mislevy, R. J. (2016). Bayesian Psychometric Modeling. CRC Press.

maugavilla avatar Apr 06 '22 09:04 maugavilla