BOOM is a C++ code base for back-end Bayesian computation.

  • The BOOM github repo is the one true home for BOOM. It is where you can get the latest updates to BOOM code and to the BOOM related R packages.
  • There is a Boom R package hosted on CRAN. For R users, this will install the BOOM libraries in a place where other R packages can look for them. The R package also contains quite a bit of glue code that can be used to specify priors, and some additional C++ code for facilitating the R/C++ interaction.

The BOOM philosophy is that while "anything box" software packages like BUGS and Stan are useful for getting models up and running quickly, they often must make simplifying assumptions that impede progress relative to custom code for specific models. BOOM provides C++ building blocks for implementing specific models and posterior samplers, with the aim that they can be relatively easily pieced together to fit more complex models using MCMC.

Bayesian Structural Time Series

The bsts package is available on CRAN.

  • Here's the original bsts paper.
  • Here's slides for one of many talks I've given on bsts.
  • Blog post on the Unofficial Google Data Science blog.

The bsts FAQ is a work in progress. I'll continue to add to it as I get questions from users.


An R package for Bayesian regression under spike and slab priors. The package supports non-Gaussian error distributions such as logistic regression, Poisson regression, multinomial logit models, student T regression, and quantile regression.

For ordinary Gaussian models the spike and slab algorithms is very fast because it works with sufficient statistics. For the other models, the algorithm works using a mix of data augmentation and Metropolis-Hastings proposals. In a data augmentation move the model creates a "complete data Gaussian model" that allows coefficients near zero to transition in and out of the zero state. In a Metropolis-Hastings move the choice of predictors is fixed, but coefficients that are far from zero can move more freely than in a DA sampler.


CausalImpact is an R package implementing the methods found in the CausalImpact paper.

CausalImpact uses bsts for counterfactual imputation. The idea is to train a time series model with contemporaneous predictors during a period prior to a market (or policy) intervention. Unlike many time-series prediction problems, those predictor variables are available during the period following the intervention. The difference between the series you actually observe and the series predicted by the model is the estimated impact of the intervention.

One problem with the preceding approach is choosing predictors to use as synthetic controls. The variable selection capabilities of bsts address the problem by automating the process of creating the controls.

CausalImpact is a Google package created by Kay Brodersen and maintained by Alain Hauser.