Runs a selected ABC method on simulated data using R package abc as an inference engine.

run_abc(data, engine, stat = NULL, ...)

Arguments

data

Simulated data set produced by simulate_abc

engine

Which ABC engine to use? As of the current version of demografr, the only valid choice is "abc".

stat

Which of the simulated summary statistics to use for inference? If NULL (the default), all simulated statistics will be used.

...

Additional arguments passed on the abc function from the abc package

Details

This function serves as a wrapper around the function abc from the R package abc. All function arguments except to data are passed to the abc function, appropriately unpacking the prior sample matrix, and binding together matrices with observed statistics and simulated statistics in the format required by the inference function.

This function exists to avoid the need to manually track parameter matrices and summary statistics as inputs to the abc function but acts entirely transparently. A such, all implementation details can be found in the abc vignette and the manpage which you can access by typing ?abc::abc.