coupled4_kernel: Runs a 4-coupled Markov kernel

View source: R/coupled4_kernel.R

coupled4_kernelR Documentation

Runs a 4-coupled Markov kernel

Description

Runs four coupled kernels (two at each discretization level) that leaves smoothing distribution at corresponding level invariant.

Usage

coupled4_kernel(
  model,
  theta,
  discretization,
  observations,
  nparticles,
  resampling_threshold,
  coupled_resampling,
  ref_trajectory_coarse1,
  ref_trajectory_coarse2,
  ref_trajectory_fine1,
  ref_trajectory_fine2,
  algorithm = "CPF",
  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 4-marginal coupled resampling scheme, such as coupled4_maximalchains_maximallevels_independent_residuals

ref_trajectory_coarse1

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

ref_trajectory_coarse2

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

ref_trajectory_fine1

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

ref_trajectory_fine2

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

algorithm

character specifying type of algorithm desired, i.e. CPF for conditional particle filter, CASPF for conditional ancestor sampling particle filter, CBSPF for conditional backward sampling particle filter

treestorage

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

Value

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


jeremyhengjm/UnbiasedGradients documentation built on Nov. 19, 2023, 11:24 p.m.