Hi all,
You may find this interesting and useful, especially if your models are mulitmodal, have discrete parameters, or you want to compute marginal likelihoods,
PolyStan: PolyChord nested sampling and Bayesian evidences for Stan models
Sampling from multi-modal distributions and estimating marginal likelihoods, also known as evidences and normalizing constants, are well-known challenges in statistical computation. They can be overcome by nested sampling, which evolves a set of live points through a sequence of distributions upwards in likelihood. We introduce PolyStan – a nested sampling inference engine for Stan. PolyStan provides a Stan interface to the PolyChord nested sampling algorithm using bridgestan. PolyStan introduces a new user-base to nested sampling algorithms and provides a black-box method for sampling from challenging distributions and computing marginal likelihoods. We demonstrate the robustness of nested sampling on several degenerate and multi-modal problems, comparing it to bridge sampling and Hamiltonian Monte Carlo.
If so, you can get started on a simple example by
git clone --recursive https://github.com/xhep-lab/polystan
cd polystan
make examples/bernoulli
./examples/bernoulli data --file examples/bernoulli.data.json
The code is here on github. Please give it a try and feel free to ask any questions here, to me by email or raise any issues on the issue tracker.
Kind regards,
Andrew