The variable selection problem has a natural Bayesian solution: Any collection of models having different sets of regressors can be computed via their Bayes factors.
A semiconjugate prior distribution
Let β∼MN(β0,Σ0), then
β∣y,X,σ2∼N((Σ0−1+XTX/σ2)−1(Σ0−1β0+XTy/σ2),(Σ0−1+XTX/σ2)−1) and let 1/σ2∼Ga(ν0/2,ν0σ02/2), then
1/σ2∣y,X,β∼Ga([ν0+n]/2,[ν0σ02+SSR(β)]/2) Then we can construct the following Gibbs sampler:
Weakly informative prior distributions
the parameter estimation should be invariant to changes in the scale of the regressors.
For the second case, we can derive a Monte Carlo approximation:
since