I have a Gaussian linear regression model with coefficient vector beta = (beta_1, ..., beta_p), and I want to use a Dirac-spike normal-slab prior for variable selection.

My model is:
y_i ~ Normal(x_i^T beta, sigma), for i = 1, ..., N,
gamma_j ~ Bernoulli(pi), for j = 1, ..., p,
beta_j | gamma_j = 0 = 0, for j = 1, ..., p,
beta_j | gamma_j = 1, sigma, sigma_slab ~ Normal(0, sigma * sigma_slab), for j = 1, ..., p.

The hyperpriors are:
pi ~ Beta(1, 1),
sigma_slab ~ Jeffreys, with p(sigma_slab) proportional to 1 / sigma_slab,
sigma ~ Jeffreys, with p(sigma) proportional to 1 / sigma.

Equivalently,
beta_j | gamma_j, sigma, sigma_slab ~ (1 - gamma_j) delta_0 + gamma_j Normal(0, sigma * sigma_slab), for j = 1, ..., p.

Here:
y_i is the observed Gaussian response for observation i,
x_i is the predictor vector for observation i,
beta_j is regression coefficient j,
gamma_j is the latent inclusion indicator for coefficient j,
pi is the prior inclusion probability,
delta_0 is a Dirac point mass at 0,
sigma is the residual standard deviation in the Gaussian regression likelihood,
sigma_slab is the relative slab standard deviation for included coefficients, so that the absolute slab standard deviation is sigma * sigma_slab.

This prior gives exact sparsity through the Dirac spike because coefficients with gamma_j = 0 are set exactly to 0 rather than merely shrunk toward 0.

Parameterization notes:
In `Normal(mu, sigma)`, `sigma` is a standard deviation.