particle_filter_initial: Create restart initial state

View source: R/particle_filter_initial.R

particle_filter_initialR Documentation

Create restart initial state

Description

Create a suitable initial condition function from a set of restart state. This takes care of a few bookkeping and serialisation details and returns a function appropriate to pass to particle_filter as initial.

Usage

particle_filter_initial(state)

Arguments

state

A matrix of state (rows are different states, columns are different realisations). This is the form of a slice pulled from a restart.

Value

A function with arguments info, n_particles and pars that will sample, with replacement, a matrix of state suitable as a starting point for a particle filter. The info and pars arguments are ignored.


mrc-ide/mcstate documentation built on July 3, 2024, 1:34 p.m.