Learn R Programming

⚠️There's a newer version (3.2.5) of this package.Take me there.

BSL (version 3.2.0)

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. This package provides a Metropolis Hastings Markov chain Monte Carlo implementation of four methods (BSL, uBSL, semiBSL and BSLmisspec) and two shrinkage estimators (graphical lasso and Warton's estimator). uBSL (Price et al. (2018) ) uses an unbiased estimator to the normal density. A semi-parametric version of BSL (semiBSL, An et al. (2018) ) is more robust to non-normal summary statistics. BSLmisspec (Frazier et al. 2019 ) estimates the Gaussian synthetic likelihood whilst acknowledging that there may be incompatibility between the model and the observed summary statistic. Shrinkage estimation can help to decrease the number of model simulations when the dimension of the summary statistic is high (e.g., BSLasso, An et al. (2019) ). Extensions to this package are planned.

Copy Link

Version

Install

install.packages('BSL')

Monthly Downloads

293

Version

3.2.0

License

GPL (>= 2)

Maintainer

Ziwen An

Last Published

November 22nd, 2020

Functions in BSL (3.2.0)

estimateLoglike

Estimate the synthetic likelihood
PENALTY-class

S4 class ``PENALTY''
BSL-package

Bayesian synthetic likelihood
estimateWhiteningMatrix

Estimate the Whitening matrix to be used in the ``wBSL'' method of Priddle2019;textualBSL
MODEL-class

S4 class ``MODEL''
BSL-class

S4 class ``BSL''.
combinePlotsBSL

Plot the densities of multiple ``bsl'' class objects.
cor2cov

Convert a correlation matrix to a covariance matrix
bsl

Performing BSL, uBSL, semiBSL and BSLmisspec
cell

Cell biology example
gaussianSynLikeGhuryeOlkin

Estimate the Gaussian synthetic (log) likelihood with an unbiased estimator
gaussianSynLike

Estimate the Gaussian synthetic (log) likelihood
gaussianRankCorr

Gaussian rank correlation
simulation

Run simulations with a give "MODEL" object
sliceGammaMean

Generate a random sample of gamma for the R-BSL-M method of Frazier2019;textualBSL using slice sampling
selectPenalty

Selecting the Penalty Parameter
synLikeMisspec

Estimate the Gaussian synthetic (log) likelihood whilst acknowledging model incompatibility
semiparaKernelEstimate

Estimate the semi-parametric synthetic (log) likelihood
getGamma

Obtain the gamma samples (the latent parameters for BSLmisspec method) from a "BSL" object
toad

Toad example
myMiniProgressBar

Progress Bar
obsMat2deltax

Convert an observation matrix to a vector of n-day displacements
mgnk

The multivariate G&K example
getLoglike

Obtain the log-likelihoods from a "BSL" object
rstable

Generate a random sample from the zero-centered stable distribution
getPenalty

Obtain the selected penalty values from a "PENALTY" object
ma2

An MA(2) model
getTheta

Obtain the samples from a "BSL" object
summStat

Compute the summary statistics with the given data
sliceGammaVariance

Generate a random sample of gamma for the R-BSL-V method of Frazier2019;textualBSL using slice sampling
sim_toad

The simulation function for the toad example
simulate_cell

Simulation function of the cell biology example