While delving into VAR models, I observed that many Bayesian estimation methods depend heavily on Gibbs sampling. Despite the abundance of Bayesian libraries in Julia, I couldn’t find a Gibbs sampling library that met my preferences. What I was seeking was a library that allows one to design a sampler as described in academic papers. Specifically, I wanted a tool that abstracts away the computational complexities, enabling me to focus on the conditional distributions. Essentially, I desired a sampler that could translate a process like:
- Sample \(\alpha\) from \(p(\alpha | y, x, \Sigma)\)
- Sample \(\Sigma\) from \(p(\Sigma | y, x, \alpha)\)
into an operational sampler.
TinyGibbs is the solution to this need. TinyGibbs introduces a single macro, @tiny_gibbs
, which converts code resembling academic pseudocode into a functioning sampler. Moreover, by leveraging the features offered by AbstractMCMC and MCMCChains, TinyGibbs supports parallel sampling and the diagnosis of MCMC chains.
For more details and to give it a try, visit the GitHub repository. Any feedback is greatly appreciated.