Source-linked AI summary
abc: an R package for Approximate Bayesian Computation (ABC)
Katalin Csilléry, Olivier François, Michael GB Blum
TL;DR
The paper addresses whether ABC can distinguish among demographic models and estimate parameters from population-genetics data. It presents the R package abc for ABC-based model selection and parameter estimation, reporting support for exponential growth in Hausa data and a bottleneck in Italian data, while noting that posterior predictive checks are not specifically implemented.
Problem
The paper evaluates whether ABC can distinguish between three demographic models.
Method
The R package abc performs model selection and parameter estimation via Approximate Bayesian Computation, with posterior predictive checks carried out using simulation software and R.
Results
The Hausa data supported exponential growth, whereas the Italian data best supported a bottleneck; Na was well estimated using three summary statistics, with error around 0.20 independently of tolerance rate.
Takeaways & Limitations
abc provides an R package for ABC-based model selection and parameter estimation.
Takeaways & Limitations
The abc package has no specific function for posterior predictive checks, although the task can be carried out using simulation software and R.
Abstract
from arXiv · showhide
Many recent statistical applications involve inference under complex models, where it is computationally prohibitive to calculate likelihoods but possible to simulate data. Approximate Bayesian Computation (ABC) is devoted to these complex models because it bypasses evaluations of the likelihood function using comparisons between observed and simulated summary statistics. We introduce the R abc package that implements several ABC algorithms for performing parameter estimation and model selection. In particular, the recently developed non-linear heteroscedastic regression methods for ABC are implemented. The abc package also includes a cross-validation tool for measuring the accuracy of ABC estimates, and to calculate the misclassification probabilities when performing model selection. The main functions are accompanied by appropriate summary and plotting tools. Considering an example of demographic inference with population genetics data, we show the potential of the R package. R is already widely used in bioinformatics and several fields of biology. The R abc package will make the ABC algorithms available to the large number of R users. abc is a freely available R package under the GPL license, and it can be downloaded at http://cran.r-project.org/web/packages/abc/index.html.
Implementation
The package implements ABC workflows for parameter estimation, model selection, diagnostics, and cross-validation. It supports rejection and regression-based methods, including local linear and neural-network corrections, with tools for summarizing and plotting results.
- ABC workflow: ABC simulates datasets, compares simulated and observed summary statistics with a distance, and accepts parameter values below a threshold.Accepted values approximate the posterior distribution and can be improved using regression techniques.
- Parameter estimation: The abc function provides rejection, local linear regression, and neural-network methods for constructing posterior distributions.The regression methods correct the mismatch between accepted and observed summary statistics.
- Regression correction: Regression-based ABC weights simulations with kernel values based on their distance from the observed summary statistics.The local linear model assumes a linear regression function, while neural networks model non-linearity and can reduce summary-statistic dimensionality.
- Diagnostics and summaries: abc applies a default heteroscedasticity correction and returns weighted posterior samples with summaries, histograms, posterior plots, distance plots, and residual diagnostics.Available summaries include mode, mean, median, and credible intervals; diagnostics include Q-Q plots and posterior densities with and without regression correction.
- Cross-validation: cv4abc uses leave-one-out validation to assess parameter-estimate accuracy and tolerance robustness, often evaluating a random subset of 100 simulations.Each validation simulation supplies pseudo-observed summary statistics while the remaining simulations estimate its parameters.
- Model selection: The package supports model selection through rejection, multinomial logistic regression, and neural networks, assuming equally likely models and equal simulation counts.It also computes posterior model probabilities, Bayes factors, approximate expected deviance, and confusion-matrix-based cross-validation.
Results and Discussion
The abc package distinguishes demographic models and estimates parameters from simulated summary statistics. In the population-genetics example, it supported expansion in Hausa data, a bottleneck in Italian data, and accurate ancestral-size estimation.
- Model selection: ABC distinguished three demographic models, with the bottleneck model classified correctly 396 times out of 500.The models were constant population size, exponential growth, and bottleneck with recovery.
- Model selection: Hausa data best supported exponential growth, whereas Italian data best supported the bottleneck model across tolerance rates of 0.1%, 0.5%, and 1%.Posterior probabilities were calculated using rejection and multinomial logistic regression.
- Posterior predictive checks: Posterior predictive checks found that exponential growth could not reproduce Italian heterozygosity, while bottleneck and constant-size models reproduced the observed summaries.The checks used posterior parameter samples to simulate summary statistics for comparison with observed values.
- Parameter estimation: Cross-validation indicated that ancestral Italian population size Na was well estimated from three summary statistics and insensitive to tolerance rate, with prediction error around 0.20.The cross-validation estimates clustered around the identity line.
Conclusions
The abc R package supports ABC-based model selection and parameter estimation, combines these capabilities with graphics and visualization tools, and implements recently developed non-linear methods. The package is intended to evolve as new algorithms and methods accumulate.
- The abc R package performs model selection and parameter estimation through Approximate Bayesian Computation.
- It integrates high-quality graphics and data visualization tools within the R statistical environment.
- The package implements recently developed non-linear methods for ABC.
- The package is expected to evolve as new algorithms and methods accumulate.
Availability and requirements
The abc package runs on Windows, Linux, and MacOS, requires R version ≥2.10 plus three R packages, and has no stated restrictions for non-academic users.
- abc supports Windows, Linux, and MacOS operating systems.
- The package requires R version ≥2.10 and the nnet, quantreg, and locfit R packages.
- The software has no restrictions on use by non-academics.
Authors’ contributions
MB and KC implemented the algorithms and methods and wrote the paper, while KC created the R package; OF reviewed the paper and tested the package.
- MB and KC implemented the algorithms and methods and wrote the paper.
- KC created the R package, while OF critically reviewed the paper and tested the package.
Additional File
An additional file titled “Main features of the ABC software” contains a table describing the software’s main features.
- The additional file is titled “Main features of the ABC software.”
- The file contains a table describing the main features of the ABC software.
Figures
The figures show ABC model comparison, posterior predictive checks, cross-validation of parameter estimates, and regression diagnostics for demographic inference.
- Model misclassification: Figure 1 uses a confusion matrix to compare classification of simulations among the bottleneck, constant, and exponential demographic models.Perfect classification would give each bar a single color corresponding to its model.
- Posterior predictive checks: Figure 2 displays posterior distributions of three summary statistics for the three demographic models alongside values computed from Italian data.The vertical bars mark the observed summary-statistic values.
- Cross-validation for parameter estimation: Figure 3 plots estimated ancestral population size Na against true values under the bottleneck model, using posterior medians for point estimates.The plot is generated from a cv4abc object.
- ABC regression diagnostics: Figure 4 provides ABC regression diagnostics, including posterior-versus-prior distributions, distances against parameter values, accepted values, and residual Q-Q diagnostics.The regression residuals are assessed with a Normal Q-Q plot, and accepted values are indicated in red.
Tables
Table 1 reports posterior probabilities for the three demographic models, with accompanying labels and probability-scale references.
- Table 1 is titled “Posterior probabilities of the different demographic models.”
- The displayed probability scale includes values from 0.0 to 2.0 and references posterior results from loclinear rejection alongside the prior.