generic_smoother: generic_smoother

View source: R/kernels.R

generic_smootherR Documentation

generic_smoother

Description

Generic smoother for all models.

Usage

generic_smoother(mt, Ct, at, Rt, G, G.labs, G.idx)

Arguments

mt

matrix: A matrix containing the filtered mean of the latent states at each time. Each row should represent one variable.

Ct

array: A 3D-array representing the filtered covariance matrix of the latent states at each time. The third dimension should represent the time index.

at

matrix: A matrix containing the one-step-ahead mean of the latent states at each time based upon the filtered mean. Each row should represent one variable.

Rt

array: A 3D-array representing the one-step-ahead covariance matrix of the latent states at each time based upon the filtered covariance matrix. The third dimension should represent the time index.

G

array: A 3D-array representing the transition matrix of the model at each time.

G.labs

matrix: A character matrix containing the type associated with each value in G.

G.idx

matrix: A numeric matrix containing the index associated with each value in G.

Details

For the models covered in this package, we always assume that the latent states have Multivariate Normal distribution. With that assumption, we can use Kalman Smoother algorithm to calculate the posterior of the states at each time, given everything that has been observed (assuming that we already know the filtered distribution of the states).

For the details about the implementation see \insertCiteArtigoPacote;textualkDGLM.

For the details about the algorithm implemented see \insertCiteArtigokParametrico;textualkDGLM, \insertCitePetris-DLM;textualkDGLM, chapter 2, \insertCiteWestHarr-DLM;textualkDGLM, chapter 4, and \insertCiteKalman_filter_origins;textualkDGLM.

Value

A list containing the smoothed mean (mts) and covariance (Cts) of the latent states at each time. Their dimension follows, respectively, the dimensions of mt and Ct.

References

\insertAllCited

See Also

fit_model

analytic_filter


kDGLM documentation built on April 4, 2025, 4:44 a.m.