Learn R Programming

KFAS (version 1.0.3)

importanceSSM: Importance Sampling of Exponential Family State Space Model

Description

Importance Sampling of Exponential Family State Space Model.

Usage

importanceSSM(model, type = c("states", "signals"), filtered = FALSE,
  nsim = 1000, save.model = FALSE, theta, antithetics = FALSE,
  maxiter = 25)

Arguments

model
Exponential family state space model of class SSModel.
type
What to simulate, 'states' or 'signals'. Default is 'states'
filtered
Simulate from $p(\alpha_t|y_{t-1},...,y_1)$ instead of $p(\alpha|y)$.
nsim
Number of independent samples. Default is 1000.
save.model
Return the original model with the samples. Default is FALSE.
theta
Initial values for conditional mode theta.
antithetics
Logical. If TRUE, two antithetic variables are used in simulations, one for location and another for scale. Default is FALSE.
maxiter
Maximum number of iterations used in linearisation. Default is 25.

Value

  • A list containing elements samples, weights and model (if save.model==TRUE).

Details

Function importanceSSM simulates states or signals of the exponential family state space model conditioned with the observations, returning the simulated samples of the states/signals with the corresponding importance weights. 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.).