selectsumm: Generic function for selecting summary statistics in ABC...

selectsummR Documentation

Generic function for selecting summary statistics in ABC inference.

Description

The function implements functions which implement summary statistics selection methods.

Usage

selectsumm(obs, param, sumstats, obspar=NULL, ssmethod = mincrit, 
verbose = TRUE, final.dens = FALSE, ...)

Arguments

obs

(matrix of) observed summary statistics.

param

matrix of simulated model parameter values.

sumstats

matrix of simulated summary statistics.

obspar

optional observed parameters (for use to assess simulation performance).

ssmethod

a function to perform summary statistics selection. Current methods are
AS.select and mincrit.

verbose

a boolean value indicating whether informative statements should be printed to screen.

final.dens

a boolean value indicating whether the posterior sample should be returned.

...

any other optional arguments to the summary selection procedure.

Details

The function is essentially a wrapper for more specific summary selection methods, and is designed to be flexible for future additions and minimization criteria. See the help files for each summary selection method for more details.

Value

A list with the following components:

best

the best subset(s) of statistics.

critvals

the calculated criterion values (if do.crit=TRUE).

err

simulation error (if obspar is supplied and do.err=TRUE).

order

the subsets considered during the algorithm (same as the input do.only.

post.sample

an array of dimension nacc x npar x ndatasets giving the posterior sample for each observed dataset. Not returned if final.dens=FALSE.

sumsubs

an index into the subsets considered during the algorithm.

Author(s)

Matt Nunes

References

Blum, M. G. B, Nunes, M. A., Prangle, D. and Sisson, S. A. (2013) A comparative review of dimension reduction methods in approximate Bayesian computation. Stat. Sci. 28, Issue 2, 189–208.

Fearnhead, P. and Prangle, D. (2012) Constructing summary statistics for approximate Bayesian computation: semi-automatic approximate Bayesian computation. J. R. Stat. Soc. B 74, Part 3, 1–28.

Joyce, P. and P. Marjoram (2008) Approximately sufficient statistics and Bayesian computation. Stat. Appl. Gen. Mol. Biol. 7 Article 26.

Nunes, M. A. and Balding, D. J. (2010) On Optimal Selection of Summary Statistics for Approximate Bayesian Computation. Stat. Appl. Gen. Mol. Biol. 9, Iss. 1, Art. 34.

Nunes, M. A. and Prangle, D. (2016) abctools: an R package for tuning approximate Bayesian computation analyses. The R Journal 7, Issue 2, 189–205.

See Also

mincrit, AS.select

Examples



# load example data:

data(coal)
data(coalobs)

param<-coal[,2]
simstats<-coal[,4:6]

# use matrix below just in case to preserve dimensions.

obsstats<-matrix(coalobs[1,4:6],nrow=1)

tmp<-selectsumm(obsstats, param, simstats, ssmethod =AS.select, tol =.1,
method = "rejection", allow.none = FALSE, inturn = TRUE, hcorr = TRUE)

tmp$best



abctools documentation built on Sept. 18, 2023, 5:14 p.m.