Model description
The random-effects mixture model for heterogeneity (distinct from the publication bias mixture model) represents the distribution of true study effects as a mixture of two Gaussian components. This captures bimodal heterogeneity — for example, when two distinct populations of studies exist that produce qualitatively different effect sizes.
This is the same model as the mixture RE distribution but framed explicitly as a heterogeneity assessment tool rather than a distributional sensitivity analysis.
Mathematical specification
Likelihood:
Mixture RE prior:
Marginal likelihood (integrated over ):
Priors:
with the ordering constraint to resolve label switching.
Stan code
data {
int<lower=1> N;
vector[N] y;
vector<lower=0>[N] se;
}
parameters {
ordered[2] mu;
vector<lower=0>[2] tau;
real<lower=0, upper=1> pi_mix;
}
model {
target += beta_lpdf(pi_mix | 2, 2);
target += normal_lpdf(mu | 0, 1);
target += cauchy_lpdf(tau | 0, 0.5);
for (i in 1:N) {
target += log_mix(
pi_mix,
normal_lpdf(y[i] | mu[1], sqrt(square(tau[1]) + square(se[i]))),
normal_lpdf(y[i] | mu[2], sqrt(square(tau[2]) + square(se[i])))
);
}
}
generated quantities {
real b_Intercept = pi_mix * mu[1] + (1 - pi_mix) * mu[2];
real b_pi = pi_mix;
}How bayesma calls this model
bayesma(
data,
model_type = "random_effect",
re_dist = "mixture"
)Parameterisation notes
The ordered[2] mu declaration enforces , which fully resolves label switching for the component means. The mixing weight is still identified up to the relabelling , but the ordering constraint breaks this symmetry.
b_Intercept is the mixture-weighted mean effect — the expected true effect for a randomly drawn study.
Distinguishing from the Maier publication bias mixture
Both the RE mixture and the Maier model use two Gaussian components. The key difference is their purpose and constraints:
| Feature | RE mixture | Maier mixture |
|---|---|---|
| Purpose | Characterise heterogeneity | Correct publication bias |
| Constraint | (ordering) | (direction) |
| Interpretation | Two populations of studies | Biased vs unbiased studies |
Known sampling difficulties
Same as the mixture RE model: use adapt_delta = 0.99 and inspect per-chain traces.
