Learn R Programming

tsissm (version 1.0.1)

simulate.tsissm.estimate: Model Simulation

Description

Simulation function for class “tsissm.estimate”.

Usage

# S3 method for tsissm.estimate
simulate(
  object,
  nsim = 1,
  seed = NULL,
  h = 1,
  newxreg = NULL,
  sim_dates = NULL,
  bootstrap = FALSE,
  innov = NULL,
  innov_type = "q",
  pars = coef(object),
  init_states = tail(object$model$states, 1),
  init_res = NULL,
  init_sigma = NULL,
  ...
)

# S3 method for tsissm.selection simulate( object, nsim = 1, seed = NULL, h = 1, newxreg = NULL, sim_dates = NULL, bootstrap = FALSE, pars = coef(object), init_states = tail(object$model$states, 1), init_res = NULL, init_sigma = NULL, ... )

Value

An object of class “tsissm.simulate” with slots for the simulated series and states.

Arguments

object

an object of class “tsissm.estimate”.

nsim

the number of paths per complete set of time steps (h).

seed

a value specifying if and how the random number generator should be initialized (‘seeded’). Either NULL or an integer that will be used in a call to set.seed before simulating the response vectors.

h

the number of time steps to simulate paths for. If this is NULL, it will use the same number of periods as in the original series.

newxreg

an optional matrix of regressors to use for the simulation if xreg was used in the estimation. If NULL and the estimated object had regressors, and h was also set to NULL, then the original regressors will be used.

sim_dates

an optional vector of simulation dates equal to h. If NULL will use the implied periodicity of the data to generate a regular sequence of dates after the first available date in the data.

bootstrap

whether to bootstrap the innovations from the estimated object by re-sampling from the empirical distribution.

innov

an optional vector of innovations (see innov_type). The length of this vector should be equal to nsim x horizon.

innov_type

if ‘innov’ is not NULL, then this denotes the type of values passed, with “q” denoting quantile probabilities (default and backwards compatible) and “z” for standardized errors.

pars

an optional named vector of model coefficients which override the estimated coefficients. No checking is currently performed on the adequacy of these coefficients.

init_states

An optional vector of states to initialize the forecast. If NULL, will use the first available states from the estimated model.

init_res

For a dynamic variance model, the initialization for the ARCH recursion of length equal to max(p,q).

init_sigma

For a dynamic variance model, the standard deviation initialization for the GARCH recursion of length equal to max(p,q).

...

not currently used.