SMC.Smooth: Generic Sequential Monte Carlo Smoothing with Marginal...

View source: R/SMC.r

SMC.SmoothR Documentation

Generic Sequential Monte Carlo Smoothing with Marginal Weights

Description

Generic sequential Monte Carlo smoothing with marginal weights.

Usage

SMC.Smooth(
  SISstep,
  SISstep.Smooth,
  nobs,
  yy,
  mm,
  par,
  xx.init,
  xdim,
  ydim,
  resample.sch,
  funH = identity
)

Arguments

SISstep

a function that performs one propagation step using a proposal distribution. Its input includes (mm,xx,logww,yyy,par,xdim,ydim), where xx and logww are the last iteration samples and log weight. yyy is the observation at current time step. It should return xx (the samples xt) and logww (their corresponding log weight).

SISstep.Smooth

the function for backward smoothing step.

nobs

the number of observations T.

yy

the observations with T columns and ydim rows.

mm

the Monte Carlo sample size m.

par

a list of parameter values.

xx.init

the initial samples of x_0.

xdim

the dimension of the state variable x_t.

ydim

the dimension of the observation y_t.

resample.sch

a binary vector of length nobs, reflecting the resampling schedule. resample.sch[i]= 1 indicating resample should be carried out at step i.

funH

a user supplied function h() for estimation E(h(x_t) | y_1,...,y_T). Default is identity for estimating the mean. The function should be able to take vector or matrix as input and operates on each element of the input.

Value

The function returns the smoothed values.

References

Tsay, R. and Chen, R. (2018). Nonlinear Time Series Analysis. John Wiley & Sons, New Jersey.


NTS documentation built on Sept. 25, 2023, 1:08 a.m.

Related to SMC.Smooth in NTS...