multilevel_CASPF: Multilevel Conditional Ancestor Sampling Particle Filter

View source: R/multilevel_CASPF.R

multilevel_CASPFR Documentation

Multilevel Conditional Ancestor Sampling Particle Filter

Description

Runs two coupled conditional particle filters (one at each discretization level) with ancestor sampling (Lindsten, Jordan and Schon, 2014).

Usage

multilevel_CASPF(
  model,
  theta,
  discretization,
  observations,
  nparticles,
  resampling_threshold,
  coupled_resampling,
  ref_trajectory_coarse = NULL,
  ref_trajectory_fine = NULL,
  treestorage = FALSE
)

Arguments

model

a list representing a hidden Markov model, e.g. hmm_ornstein_uhlenbeck

theta

a vector of parameters as input to model functions

discretization

lists containing stepsize, nsteps, statelength, obstimes for fine and coarse levels, and coarsetimes of length statelength_fine indexing time steps of coarse level

observations

a matrix of observations, of size nobservations x ydimension

nparticles

number of particles

resampling_threshold

ESS proportion below which resampling is triggered (always resample at observation times by default)

coupled_resampling

a 2-way coupled resampling scheme, such as coupled2_maximal_independent_residuals

ref_trajectory_coarse

a matrix of reference trajectory for coarser discretization level, of size xdimension x statelength_coarse

ref_trajectory_fine

a matrix of reference trajectory for finer discretization level, of size xdimension x statelength_fine

treestorage

logical specifying tree storage of Jacob, Murray and Rubenthaler (2013); if missing, this function store all states and ancestors

Value

two new trajectories stored as matrices of size xdimension x statelength_coarse/fine.


jeremyhengjm/UnbiasedScore documentation built on Nov. 17, 2023, 1:48 a.m.