Learn R Programming

KFAS (version 0.9.9)

simulateSSM: Simulation of a Gaussian State Space Model

Description

Function simulateSMM simulates states, disturbances or missing observations of the Gaussian state space object conditionally on the data.

Usage

simulateSSM(object,
    sim = c("states", "disturbances", "observations"),
    nsim = 1, antithetics = FALSE, conditional = TRUE)

Arguments

object
Gaussian state space object.
sim
What to simulate. Note that all the simulations are done independently.
nsim
Number of independent samples. Default is 1.
antithetics
Use antithetic variables in simulation. Default is FALSE.
conditional
Simulations are conditional to data. If FALSE, the initial state $\alpha_1$ is set to $\hat \alpha_1$ computed by KFS, and all the observations are removed from the model. Default is TRUE.

Details

Simulation smoother algorithm is from article by J. Durbin and S.J. Koopman (2002).

Function can use two antithetic variables, one for location and other for scale, so output contains four blocks of simulated values which correlate which each other (ith block correlates negatively with (i+1)th block, and positively with (i+2)th block etc.).

References

Durbin J. and Koopman, S.J. (2002). A simple and efficient simulation smoother for state space time series analysis, Biometrika, Volume 89, Issue 3