Skip to contents

Sequential Monte Carlo algorithm

Usage

smc(
  n_particles,
  priors,
  simulate_data,
  obs_data,
  distance_function,
  epsilon = Inf,
  n_iter = 1
)

Arguments

n_particles

Number of particles to sample

priors

List of prior distributions

simulate_data

Function to simulate data from parameters

obs_data

Observed data

distance_function

Function to calculate the distance between the fake data and the observed data

epsilon

Maximum distance for a particle to be accepted

n_iter

Number of iterations

Value

List of populations