Abc

object Abc

Functions for parameter inference using ABC (and ABC-SMC) methods

class Object
trait Matchable
class Any

Value members

Concrete methods

def run[P, D](n: Int, rprior: => P, dist: P => D): ParSeq[(P, D)]

Function for running ABC simulations in parallel on all cores. This function simply carries out the runs. No post-processing (including rejection) is carried out.

Function for running ABC simulations in parallel on all cores. This function simply carries out the runs. No post-processing (including rejection) is carried out.

Value Params
dist

Function that takes a single parameter value and runs a forward simulation from the model, then computes distance of output from a target data set

n

The number of ABC simulations to be carried out

rprior

Function returing a single simulated parameter value from a prior

Returns

The collection of generated parameters together with their simulated distances from a target data set

def smc[P](N: Int, rprior: => P, dprior: P => LogLik, rdist: P => Double, rperturb: P => P, dperturb: (P, P) => LogLik, factor: Int, steps: Int, verb: Boolean): ParSeq[P]

Function for running an ABC-SMC algorithm in parallel on all available cores.

Function for running an ABC-SMC algorithm in parallel on all available cores.

Value Params
N

Number of samples to be propagated forward at each sweep

dperturb

Function for evaluating the log-density of a perturbed parameter relative to an original parameter. In the case of a non-symmetric perturbation kernel, it is the new, perturbed value that is the first element of the tuple.

dprior

Function returning the log-density of a parameter under the prior

factor

The acceptance rate at each sweep is 1/factor

rdist

Function which takes a parameter, runs a forward simultation, and then calculates a distance (as a scalar Double) from a target data set

rperturb

Function to perturb a parameter vector (perturbation kernel, in ABC-SMC speak)

rprior

Function for simulating from a prior on the parameters

steps

The number of sweeps of the ABC-SMC algorithm to perform

verb

Print progress to the console?

Returns

An equally weighted sample from the ABC-SMC parameter posterior, approximately of size N

def summary[P, D](output: ParSeq[(P, D)])(implicit evidence$1: CsvRow[P]): Unit

Generate some basic diagnostics associated with an ABC run. Called purely for the side effect of generating output on the console.

Generate some basic diagnostics associated with an ABC run. Called purely for the side effect of generating output on the console.

Value Params
output

Collection of runs (and distances) such as generated from run