get_path_bs: Get a path from the output of a particle filter using...

View source: R/get_path.R

get_path_bsR Documentation

Get a path from the output of a particle filter using backward sampling (Whiteley, 2010)

Description

Get a path from the output of a particle filter by sampling an ancestry.

Usage

get_path_bs(
  model,
  discretization,
  xtrajectory,
  ancestries,
  ancestor,
  store_logweights
)

Arguments

model

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

discretization

list containing stepsize, nsteps, statelength and obstimes

xtrajectory

an array of particle states, of size statelength x xdimension x nparticles

ancestries

a matrix of ancestor indexes, of size statelength x nparticles

ancestor

an ancestor index at the terminal step

store_logweights

a matrix of log-weights, of size nobservations x nparticles

Value

a matrix containing a new trajectory of size xdimension x statelength.


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