approximate_discretized_score: MCMC estimator of score function at a discretization level

View source: R/approximate_discretized_score.R

approximate_discretized_scoreR Documentation

MCMC estimator of score function at a discretization level

Description

Computes MCMC estimator of the time-discretized score function.

Usage

approximate_discretized_score(
  model,
  theta,
  discretization,
  observations,
  nparticles,
  resampling_threshold = 1,
  initialization = "particlefilter",
  algorithm = "CPF",
  max_iterations
)

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

list containing stepsize, nsteps, statelength and obstimes

observations

a matrix of observations of size terminal_time x ydimension

nparticles

number of particles

resampling_threshold

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

initialization

choice of distribution to initialize chains, such as dynamics or the default particlefilter

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

max_iterations

number of MCMC iterations

Value

a list with objects such as: mcmcestimator is the MCMC estimator of the discretized score; cost is the cost of the algorithm; elapsedtime is the time taken by the algorithm.


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