Could you please clarify how to interpret the theta2_covar coefficient (I know model fit is very poor)? Is it the log odds of being in mixture 2?
simulate some data
set.seed(1234)
dat ← data.frame(
y = c(rnorm(100), rnorm(50, 2)),
x = rnorm(150),
covar = rnorm(150)
)
fit a simple normal mixture model
fit1 ← brm(bf(y ~ x,
theta2 ~ covar),
data = dat,
family = mixture(gaussian, nmix = 2),
chains = 2, init = 0)
summary(fit1)
Family: mixture(gaussian, gaussian)
Links: mu1 = identity; sigma1 = identity; mu2 = identity; sigma2 = identity; theta1 = identity; theta2 = identity
Formula: y ~ x
theta2 ~ covar
Data: dat (Number of observations: 150)
Draws: 2 chains, each with iter = 2000; warmup = 1000; thin = 1;
total post-warmup draws = 2000
Population-Level Effects:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
mu1_Intercept 0.33 0.38 -0.50 0.74 1.21 7 22
mu2_Intercept 0.70 0.16 0.42 1.06 1.03 61 139
theta2_Intercept 2.91 6.05 -8.29 13.70 1.17 31 117
mu1_x -0.03 0.33 -0.56 0.57 1.10 15 73
mu2_x -0.03 0.25 -0.52 0.45 1.02 31 156
theta2_covar 57.77 133.76 -177.65 299.19 1.14 25 130
Family Specific Parameters:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sigma1 1.33 0.34 0.54 1.76 1.19 12 16
sigma2 1.40 0.15 1.13 1.73 1.06 41 171