batchSeqMC: Sequential Monte Carlo

Description Usage Arguments Value

View source: R/seqMC.R

Description

Sequential Monte Carlo

Usage

1
2
batchSeqMC(f, logprob_y_given_x, x0, y, sample_method = c("systematic",
  "residual", "bootstrap"))

Arguments

f

function, when called with parameter t (time point) and x_t (state vector at time t), it would return x_(t+1)

logprob_y_given_x

function, when called with parameter t (time point), y_t (observation vector at time t) and x_t (state vector at time t), it would return the conditional log_probability: log(Prob(y_t | x_t ))

x0

matrix, sample of state vector at time 0, each col is a sample of state at time 0.

y

matrix of T cols, observations, col 1 is observation at time 1, col 2 is observation at time 2, ... etc. T is the number of time points.

sample_method

character, specify sample method in the resample stage. Default systematic, means "systematic resampling".

Value

sample from posterior distribution of state vectors, a 3D array, with dimension of d x N x T, where d is the length of a state vector, N is the number of samples, T is the number of time steps.


chuanwen/seqMC documentation built on May 4, 2019, 3:19 p.m.