I am looking for a simple example of posterior density with a spike and slab prior.
Suppose we have the prior $$b|\pi_0 \sim (1-\pi_0)\mathcal{N}_K(0,I_K) +\pi_0\delta_0$$ where $\delta_0$ is a dirac in 0 and $\pi_0\sim Beta(\alpha,\beta)$.
How could I compute the density $\pi(b|\pi_0)$ to use in more general posterior distributions?
The p.d.f. of the prior is $(1-\pi_0)\phi(b) + \pi_0 \delta_0$ where $\phi(b)$ is the p.d.f. of the normal distribution. It's positive. The integration equals to $1$.
I saw you have a hyper-prior for $\pi_0$. Sometimes people further integrate-out $\pi_0$ in the posterior calculation, and leave only hyper-prior parameter $\alpha$ and $\beta$.