Returns nsim
samples from the approximating Gaussian model with corresponding
(scaled) importance weights.
importance_sample(model, nsim, use_antithetic, max_iter, conv_tol, seed, ...)# S3 method for nongaussian
importance_sample(
model,
nsim,
use_antithetic = TRUE,
max_iter = 100,
conv_tol = 1e-08,
seed = sample(.Machine$integer.max, size = 1),
...
)
of class bsm_ng
, ar1_ng
svm
, ssm_ung
, or ssm_mng
.
Number of samples.
Logical. If TRUE
(default), use antithetic
variable for location in simulation smoothing. Ignored for ssm_mng
models.
Maximum number of iterations used for the approximation.
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 for the random number generator.
Ignored.