  Approximate Bayesian computation is a statistical framework that uses
numerical simulations to calibrate and compare models. Instead of computing
likelihood functions, Approximate Bayesian computation relies on numerical
simulations, which makes it applicable to complex models in ecology and
evolution. As usual for statistical modeling, evaluating goodness-of-fit is a
fundamental step for Approximate Bayesian Computation. Here, we introduce a
goodness-of-fit approach based on hypothesis-testing. We introduce two test
statistics based on the mean distance between numerical summaries of the data
and simulated ones. One test statistic relies on summaries simulated with the
prior predictive distribution whereas the other one relies on simulations from
the posterior predictive distribution. For different coalescent models, we find
that the statistics are well calibrated, meaning that the type I error can be
controlled. However, the statistical power of the two statistics is extremely
variable across models ranging from 20% to 100%. The difference of power
between the two statistics is negligible in models of demographic inference but
substantial in an additional and purely statistical example. When analyzing
resequencing data to evaluate models of human demography, the two statistics
confirm that an out-of-Africa bottleneck cannot be rejected for Asiatic and
European data. We also consider two speciation models in the context of a
butterfly species complex. One goodness-of-fit statistic indicates a poor fit
for both models, and the numerical summaries causing the poor fit were
identified using posterior predictive checks. Statistical tests for
goodness-of-fit should foster evaluation of model fit in Approximate Bayesian
Computation. The test statistic based on simulations from the prior predictive
distribution is implemented in the gfit function of the R abc package.
