Particle Smoothing
Function particle_smoother performs particle smoothing
based on either bootstrap particle filter [1], ψ-auxiliary particle filter (ψ-APF) [2],
or extended Kalman particle filter [3] (or its iterated version [4]).
The smoothing phase is based on the filter-smoother algorithm by [5].
particle_smoother(model, particles, ...) ## S3 method for class 'gaussian' particle_smoother( model, particles, method = "psi", seed = sample(.Machine$integer.max, size = 1), ... ) ## S3 method for class 'nongaussian' particle_smoother( model, particles, method = "psi", seed = sample(.Machine$integer.max, size = 1), max_iter = 100, conv_tol = 1e-08, ... ) ## S3 method for class 'ssm_nlg' particle_smoother( model, particles, method = "bsf", seed = sample(.Machine$integer.max, size = 1), max_iter = 100, conv_tol = 1e-08, iekf_iter = 0, ... ) ## S3 method for class 'ssm_sde' particle_smoother( model, particles, L, seed = sample(.Machine$integer.max, size = 1), ... )
model |
Model. |
particles |
Number of samples for particle filter. |
... |
Ignored. |
method |
Choice of particle filter algorithm.
For Gaussian and non-Gaussian models with linear dynamics,
options are |
seed |
Seed for RNG. |
max_iter |
Maximum number of iterations used in Gaussian approximation. Used ψ-APF. |
conv_tol |
Tolerance parameter used in Gaussian approximation. Used ψ-APF. |
iekf_iter |
If zero (default), first approximation for non-linear
Gaussian models is obtained from extended Kalman filter. If
|
L |
Integer defining the discretization level. |
See one of the vignettes for ψ-APF in case of nonlinear models.
List with samples (alpha) from the smoothing distribution and corresponding weights (weights),
as well as smoothed means and covariances (alphahat and Vt) of the states and
estimated log-likelihood (logLik).
[1] Gordon, N. J., Salmond, D. J., & Smith, A. F. M. (1993). Novel approach to nonlinear/non-Gaussian Bayesian state estimation. IEE Proceedings-F, 140, 107–113. [2] Vihola, M, Helske, J, Franks, J. Importance sampling type estimators based on approximate marginal Markov chain Monte Carlo. Scand J Statist. 2020; 1– 38. https://doi.org/10.1111/sjos.12492 [3] Van Der Merwe, R., Doucet, A., De Freitas, N., & Wan, E. A. (2001). The unscented particle filter. In Advances in neural information processing systems (pp. 584-590). [4] Jazwinski, A. 1970. Stochastic Processes and Filtering Theory. Academic Press. [5] Kitagawa, G. (1996). Monte Carlo filter and smoother for non-Gaussian nonlinear state space models. Journal of Computational and Graphical Statistics, 5, 1–25.
set.seed(1) x <- cumsum(rnorm(100)) y <- rnorm(100, x) model <- ssm_ulg(y, Z = 1, T = 1, R = 1, H = 1, P1 = 1) system.time(out <- particle_smoother(model, particles = 1000)) # same with simulation smoother: system.time(out2 <- sim_smoother(model, particles = 1000, use_antithetic = TRUE)) ts.plot(out$alphahat, rowMeans(out2), col = 1:2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.