BSL-package {BSL} | R Documentation |
Bayesian synthetic likelihood
Description
Bayesian synthetic likelihood (BSL, Price et al. (2018)) is an alternative to standard, non-parametric approximate Bayesian computation (ABC). BSL assumes a multivariate normal distribution for the summary statistic likelihood and it is suitable when the distribution of the model summary statistics is sufficiently regular.
In this package, a Metropolis Hastings Markov chain Monte Carlo (MH-MCMC) implementation of BSL is available. We also include implementations of four methods (BSL, uBSL, semiBSL and BSLmisspec) and two shrinkage estimators (graphical lasso and Warton's estimator).
Methods: (1) BSL (Price et al. 2018), which is the standard form of Bayesian synthetic likelihood, assumes the summary statistic is roughly multivariate normal; (2) uBSL (Price et al. 2018), which uses an unbiased estimator to the normal density; (3) semiBSL (An et al. 2019), which relaxes the normality assumption to an extent and maintains the computational advantages of BSL without any tuning; and (4) BSLmisspec (Frazier and Drovandi 2021), which estimates the Gaussian synthetic likelihood whilst acknowledging that there may be incompatibility between the model and the observed summary statistic.
Shrinkage estimators are designed particularly to reduce the number of simulations if method is BSL or semiBSL: (1) graphical lasso (Friedman et al. 2008) finds a sparse precision matrix with an L1-regularised log-likelihood. An et al. (2019) use graphical lasso within BSL to bring down the number of simulations significantly when the dimension of the summary statistic is high; and (2) Warton's estimator (Warton 2008) penalises the correlation matrix and is straightforward to compute. When using the Warton's shrinkage estimator, it is also possible to utilise the Whitening transformation (Kessy et al. 2018) to help decorrelate the summary statsitics, thus encouraging sparsity of the synthetic likelihood covariance matrix.
Parallel computing is supported through the foreach
package and users
can specify their own parallel backend by using packages like
doParallel
or doMC
. The n
model simulations required to
estimate the synthetic likelihood at each iteration of MCMC will be
distributed across multiple cores. Alternatively a vectorised simulation
function that simultaneously generates n
model simulations is also
supported.
The main functionality is available through:
-
bsl
: The general function to perform BSL, uBSL, or semiBSL (with or without parallel computing). -
selectPenalty
: A function to select the penalty when using shrinkage estimation within BSL or semiBSL.
Several examples have also been included. These examples can be used to reproduce the results of An et al. (2019), and can help practitioners learn how to use the package.
-
ma2
: The MA(2) example from An et al. (2019). -
mgnk
: The multivariate G&K example from An et al. (2019). -
cell
: The cell biology example from Price et al. (2018) and An et al. (2019). -
toad
: The toad example from Marchand et al. (2017), and also considered in An et al. (2019).
Extensions to this package are planned. For a journal article describing how to use this package, including full descriptions on the MA(2) and toad examples, see An et al. (2022).
Author(s)
Ziwen An, Leah F. South and Christopher Drovandi
References
An Z, Nott DJ, Drovandi C (2019).
“Robust Bayesian Synthetic Likelihood via a Semi-Parametric Approach.”
Statistics and Computing (In Press).
An Z, South LF, Drovandi CC (2022).
“BSL: An R Package for Efficient Parameter Estimation for Simulation-Based Models via Bayesian Synthetic Likelihood.”
Journal of Statistical Software, 101(11), 1–33.
doi: 10.18637/jss.v101.i11.
An Z, South LF, Nott DJ, Drovandi CC (2019).
“Accelerating Bayesian Synthetic Likelihood With the Graphical Lasso.”
Journal of Computational and Graphical Statistics, 28(2), 471–475.
doi: 10.1080/10618600.2018.1537928.
Frazier DT, Drovandi C (2021).
“Robust Approximate Bayesian Inference with Synthetic Likelihood.”
Journal of Computational and Graphical Statistics (In Press).
https://arxiv.org/abs/1904.04551.
Friedman J, Hastie T, Tibshirani R (2008).
“Sparse Inverse Covariance Estimation with the Graphical Lasso.”
Biostatistics, 9(3), 432–441.
Kessy A, Lewin A, Strimmer K (2018).
“Optimal Whitening and Decorrelation.”
The American Statistician, 72(4), 309–314.
doi: 10.1080/00031305.2016.1277159.
Marchand P, Boenke M, Green DM (2017).
“A stochastic movement model reproduces patterns of site fidelity and long-distance dispersal in a population of Fowlers toads (Anaxyrus fowleri).”
Ecological Modelling, 360, 63–69.
ISSN 0304-3800, doi: 10.1016/j.ecolmodel.2017.06.025.
Price LF, Drovandi CC, Lee A, Nott DJ (2018).
“Bayesian Synthetic Likelihood.”
Journal of Computational and Graphical Statistics, 27, 1–11.
doi: 10.1080/10618600.2017.1302882.
Warton DI (2008).
“Penalized Normal Likelihood and Ridge Regularization of Correlation and Covariance Matrices.”
Journal of the American Statistical Association, 103(481), 340–349.
doi: 10.1198/016214508000000021.