Hello,
I have
x ~ gamma(alpha/(beta+1), beta);
alpha ~ mixture_gamma()
beta ~ mixture_gamma()
for(g in 1:(G)) for(p in 1:P) target += log_mix(lambda,
gamma_lpdf(alpha[p,g] | h_a*100, 1/h_b[1]),
gamma_lpdf(alpha[p,g] | h_a*100, 1/h_b[2])
);
for(g in 1:(G)) for(p in 1:P) target += log_mix(lambda,
gamma_lpdf(beta[p,g] | o_a, 1/o_b[1]*10),
gamma_lpdf(beta[p,g] | o_a, 1/o_b[2]*10)
);
But I would like to force the first distribution of the mixes to CO-occur. Something like
for(g in 1:(G)) for(p in 1:P) target += log_mix(lambda,
gamma_lpdf(alpha[p,g] | h_a[1]*100, 1/h_b[1]) + gamma_lpdf(beta[p,g] | o_a, 1/o_b[1]*100),
gamma_lpdf(alpha[p,g] | h_a[2]*100, 1/h_b[2]) + gamma_lpdf(beta[p,g] | o_a, 1/o_b[2]*100)
);
Am I doing something clearly wrong?