AS.select {abctools} | R Documentation |
Summary statistics selection using approximate sufficiency.
Description
This function uses approximate sufficiency to assess subsets of summary statistics for ABC inference.
Usage
AS.select(obs, param, sumstats, obspar=NULL, abcmethod=abc,
grid=10, inturn=TRUE, limit=ncol(sumstats), allow.none=FALSE,
do.err=FALSE, final.dens=FALSE, errfn=rsse, trace=TRUE, ...)
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). |
abcmethod |
a function to perform ABC inference, e.g. the |
grid |
the number of bins into which to divide the posterior sample for the approximate sufficiency calculation. |
inturn |
a boolean value indicating whether "bad" statistics should be dropped and tested sequentially ( |
limit |
an optional integer indicating whether to limit summary selection to subsets of a maximum size. |
allow.none |
a boolean values indicating whether an empty subset of statistics is considered in the selection procedure. |
do.err |
a boolean value indicating whether the simulation error should be returned. Note: if |
final.dens |
a boolean value indicating whether the posterior sample should be returned. |
errfn |
an error function to assess ABC inference performance. |
trace |
whether to show progress messages. |
... |
any other optional arguments to the ABC inference procedure (e.g. arguments to the |
Details
The summary selection procedure works by sequentially testing randomly chosen statistics for inclusion, using the ratio of ABC posterior samples to determine whether a statistic is added. Since adding a statistic may result in a suboptimal subset of summaries, the included statistics are then individually dropped and retested, to determine whether a smaller subset of statistics is equally / more informative than the accepted set of statistics.
Value
A list with the following components:
best |
the final subset of included statistics. |
err |
simulation error (if |
post.sample |
an array of dimension |
Note
The approximate sufficiency techniques described here are only suitable for single parameters only.
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.
Joyce, P. and P. Marjoram (2008) Approximately sufficient statistics and
Bayesian computation. Stat. Appl. Gen. Mol. Biol. 7
Article 26.
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
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)
# example of AS.select:
## Not run:
tmp <-AS.select(obsstats, param, simstats, tol=.1, method="neuralnet",
nument=5, allow.none=FALSE, inturn=TRUE)
tmp$best
## End(Not run)