Learn R Programming

bssm (version 0.1.8)

importance_sample: Importance Sampling from non-Gaussian State Space Model

Description

Returns nsim samples from the approximating Gaussian model with corresponding (scaled) importance weights.

Usage

importance_sample(object, nsim, use_antithetic, max_iter, conv_tol, seed,
  ...)

# S3 method for ngssm importance_sample(object, nsim, use_antithetic = TRUE, max_iter = 100, conv_tol = 1e-08, seed = sample(.Machine$integer.max, size = 1), ...)

# S3 method for ng_bsm importance_sample(object, nsim, use_antithetic = TRUE, max_iter = 100, conv_tol = 1e-08, seed = sample(.Machine$integer.max, size = 1), ...)

# S3 method for svm importance_sample(object, nsim, use_antithetic = TRUE, max_iter = 100, conv_tol = 1e-08, seed = sample(.Machine$integer.max, size = 1), ...)

# S3 method for ung_ar1 importance_sample(object, nsim, use_antithetic = TRUE, max_iter = 100, conv_tol = 1e-08, seed = sample(.Machine$integer.max, size = 1), ...)

Arguments

object

of class ng_bsm, svm or ngssm.

nsim

Number of samples.

use_antithetic

Logical. If TRUE (default), use antithetic variable for location in simulation smoothing.

max_iter

Maximum number of iterations used for the approximation.

conv_tol

Convergence threshold for the approximation. Approximation is claimed to be converged when the mean squared difference of the modes is less than conv_tol.

seed

Seed for the random number generator.

...

Ignored.