Solution (source code)

= Solution

Introduce independent component indicators $z_i\mid q\sim\operatorname{Bernoulli}(q)$, and auxiliary slab effects $u_i\sim N(0,V)$, independent of the indicators. Set $\theta_i=z_i u_i$. Then inactive genes have exactly zero effect, while active genes have the stipulated normal distribution. With $V>0$ supplied as known data and elicited positive beta shapes, one suitable <WinBUGS> model is
``
model {
q ~ dbeta(aq, bq)
for (i in 1:N) {
z[i] ~ dbern(q)
u[i] ~ dnorm(0, 1/V)
theta[i] <- z[i]*u[i]
y[i] ~ dnorm(theta[i], 1)
}
}
``
The normal arguments are precisions, not variances. Supply all observed `y` values, monitor `q`, `theta` and optionally `z`, and assess <Markov chain Monte Carlo convergence diagnostics>. The proper auxiliary prior remains defined for inactive genes, where $u_i$ is not informed by the likelihood. This represents the exact <point-null mixture prior>, rather than replacing its point mass by a narrow continuous spike. Conditional on the indicators, $q\mid z$ has <Beta distribution> $\operatorname{Beta}(a_q+\sum_i z_i,b_q+N-\sum_i z_i)$, providing a useful check on the update.