Forward Filtering Backward Sampling algorithm for sampling from the joint full conditional of the hidden state of a linear, Gaussian state space model. To be more specific, one samples from \(P[\alpha|.]\) where \(\alpha\) is specified through $$y_t = lp_t + H xi_t + nu_t, \nu_t ~ N(0,\Omega)$$ and $$\alpha_t = G \alpha_{t-1} + \epsilon_t, \epsilon_t ~ N(0,\Sigma).$$
ffbs(y, lp, G, Sigma, H, Omega, N = dim(y)[2],T = dim(y)[1],
NF = dim(G)[1], lglk = FALSE, BwSp = TRUE, filt = FALSE)
A list with entries (depending on whether 'lglk', 'BwSp', 'filt' are 'TRUE' or 'FALSE'):
A T x N matrix with a sample from the full conditional of latent process \(\alpha\),
The evaluated log-likelihood,
A T x N matrix with the mean of the full conditional of latent process \(\alpha\).
Observed data in an T x N matrix with columns and rows corresponding to time and space, respectively.
Mean (linear predictor) in an T x N matrix with columns and rows corresponding to time and space, respectively.
Propagator matrix of the latent process \(\alpha\).
Innovation covariance matrix of the latent process \(\alpha\).
Observation matrix relating y to \(\alpha\).
Covariance matrix of the observation error \(\nu\).
Number of points in space.
Number of points in time.
Dimension of the latent process \(\alpha\).
Logical; if 'TRUE' the value of the log-likelihood is returned as well.
Logical; if 'TRUE' a sample from the full conditional of \(\alpha\) is returned.
Logical; if 'TRUE' the filtered values for \(\alpha\) are returned.
Fabio Sigrist
In the context of the SPDE, \(\alpha\) are the Fourier coefficients.