kfJSD: Kalman joint smoothing

View source: R/04_kf_JS.R

kfJSDR Documentation

Kalman joint smoothing

Description

Performs joint smoothiong via backward simulation i.e. generating nSimJS realizations from p(x_{1:T}|y_{1:T}), as described in the corresponding "Joint smoothing density- implemented backward simulation recursions" subsection of the Details section in kfLGSSM.

Usage

kfJSD(uReg, xtt, Ptt, A, B, Q, dimX, TT, nSimJS = 1)

Arguments

uReg

Matrix (vector) of regressors for the latent state process of dimension ncol(B) x T. For a single regressors uReg is a vector of length T.

xtt

forward filtering means as produced by kfMFPD

Ptt

forward filtering variances as produced by kfMFPD

A

Parameter (or system) matrix of dimension dimX x dimX.

B

Parameter (or system) matrix of dimension dimX x numU.

Q

Error VCM of state process of dimension dimX x dimX.

dimX

integer giving the dimension of the latent state process

TT

integer giving the length of the time series

nSimJS

Number of joint smoothing (backward simulation) runs; defaults to nSimJS=1.

Value

a named list of three:

  • jsdEXP: an array of dimension dimX x TT x nSimJS giving the smoothing means \mu_t of dimension dimX for all t=TT,\ldots,1 per 1,\ldots,nSimJS simulation run

  • jsdVAR: an array of dimension dimX x dimX TT giving the smoothing variances L_t of dimension dimX x dimX for all t=TT,\ldots,1 (note: these do not change with the number of simulation runs nSimJS, in contrast to previous means)

  • jsdTRJ: an array of dimension dimX x TT x nSimJS giving the sampled trajectories \tilde{x}_{1:T} (dimX x TT) from p(x_{1:T}|y_{1:T}) for each simulation nSimJS


ilyaZar/RcppSMCkalman documentation built on Oct. 19, 2023, 11 a.m.