I am new to Stan and have trouble in modelling mixture prior. I would like to assign a mixture prior, which is a normal distribution with a discrete point(dirac delta function with mass at 0).
Have tried explore the Stan forum and few questions mentioned this without answers. In the Stan Users guide, the content in Chapter 5 Finite Mixtures also didn’t mention this kind of quesitons.
Could anybody kindly help me out on this? Discussions welcomed too!
Presumably trying to implement a spike-and-slab prior? The reason you’re not finding any existing solutions is because those are generally a bad idea and certainly cause issues with HMC thanks to the non-smooth gradient. Maybe take a look at the recent paper on Bayes factors (spike and slab being common in the bf world).
Tagging @avehtari to see if he agrees with such defamation of poor old spike-and-slab priors.
Now that I’ve read a bit, I see that I spoke well beyond my expertise on this one. I had the mistaken impression from who knows where that spike-and-slab was used primarily for Hypothesis testing via Bayes Factors, but see now that I had that completely wrong and they’re used as a mixture model for accommodating sparsity among many predictors, which totally makes sense. Furthermore, it should be straightforward to code in Stan, so I’m surprised now that I also haven’t seen implementations here. Maybe the Finnish Horseshoe is clearly superior and that’s why?
I’ve tried but I think my attempt is flawed. I mean to come back to it at some point.
That’s precisely why I tagged Aki. The tone in my initial post should be read as tongue-in-cheek. I should’ve thrown a ;-) in there, for good measure.
Thank you all for the help and discussion. Trying to tagging @avehtari for more suggestions.
I don’t remember a good example for spike-and-slab in Stan, but
zero-inflated models are kind of spike and slab models
It would be useful to know what is your use case, to give further advice.