MGPS prior in stan

Can we model Multiplicative Gamma Process Shrinkage Priors (Bhattacharya and Dunson 2011) in stan? What would be a stan-friendly alternative?

We can’t directly code an unbounded mixture in Stan. The best we can do is a large finite approximation. The paper’s too dense and I’m too clueless about non-parametrics to skim, so I don’t know if you can approximate it. What you have to do is make a finite approximation of the unbounded process, then write down a function that computes the log density of the prior so that it’s differentiable. If you can do that, you can try to fit. What often happens in even moderately high dimensions is that the posteriors are so multimodal that HMC and every other known method will fail to sample from them—the paper talks about running a Gibbs sampler, but I didn’t see any convergence diagnostics..

1 Like

Thank you so much for the response. I am running a factor analysis, where MGSP priors were suggested for the factor loadings, allowing us to avoid choosing the number of factors. I was wondering if there is an alternative for stan.

You can just use a large finite mixture that’s big enough. I’d like to issue a warning, though: you’re going to find that this is very unstable computationally and you won’t be able to run things like R-hat because the indexes of clusters won’t be identified. So you might want to read the User’s Guide section on mixture modeling for advice, like just looking at posterior predictive inference that marginalizes out the indexes.

2 Likes