Learn R Programming

SimInf (version 8.3.0)

SimInf_abc-class: Class "SimInf_abc"

Description

Class "SimInf_abc"

Arguments

Slots

model

The SimInf_model object to estimate parameters in.

priors

A data.frame containing the four columns parameter, distribution, p1 and p2. The column parameter gives the name of the parameter referred to in the model. The column distribution contains the name of the prior distribution. Valid distributions are 'gamma', 'normal' or 'uniform'. The column p1 is a numeric vector with the first hyperparameter for each prior: 'gamma') shape, 'normal') mean, and 'uniform') lower bound. The column p2 is a numeric vector with the second hyperparameter for each prior: 'gamma') rate, 'normal') standard deviation, and 'uniform') upper bound.

target

Character vector (gdata or ldata) that determines if the ABC-SMC method estimates parameters in model@gdata or in model@ldata.

pars

Index to the parameters in target.

npart

The number of particles in each generation.

nprop

An integer vector with the number of simulated proposals in each generation.

fn

A function for calculating the summary statistics for the simulated trajectory and determine for each particle if it should be accepted (TRUE) or rejected (FALSE). The first argument in fn is the simulated model containing one trajectory. The second argument to fn is an integer with the generation of the particles. The function should return a logical vector with one value for each particle in the simulated model.

epsilon

A numeric matrix (number of summary statistics X number of generations) where each column contains the tolerances for a generation and each row contains a sequence of gradually decreasing tolerances.

x

A list where each item is a matrix with the accepted particles in each generation. Each column is one particle.

w

A list where each item is a vector with the weights for the particles x in the corresponding generation.

ess

A numeric vector with the effective sample size (ESS) in each generation. Effective sample size is computed as $$\left(\sum_{i=1}^N\!(w_{g}^{(i)})^2\right)^{-1},$$ where \(w_{g}^{(i)}\) is the normalized weight of particle \(i\) in generation \(g\).

See Also

abc and continue.