simulate: Model Simulation

simulate.tsissm.estimateR Documentation

Model Simulation

Description

Simulation function for class “tsissm.estimate”.

Usage

## S3 method for class 'tsissm.estimate'
simulate(
  object,
  nsim = 1,
  seed = NULL,
  h = NULL,
  newxreg = NULL,
  sim_dates = NULL,
  bootstrap = FALSE,
  innov = NULL,
  sigma_scale = 1,
  pars = coef(object),
  init_states = object$spec$xseed,
  ...
)

Arguments

object

an object of class “tsissm.estimate”.

nsim

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

seed

an object 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. If set, the value is saved as the "seed" attribute of the returned value. The default, NULL will not change the random generator state, and return .Random.seed as the “seed” attribute in the returned object.

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-sampliag from the empirical distribution.

innov

an optional vector of uniform innovations which will be translated to regular innovations using the appropriate distribution quantile function and model standard deviation. The length of this vector should be equal to nsim x horizon.

sigma_scale

An optional scalar which will scale the standard deviation of the innovations (useful for profiling under different assumptions).

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.

...

not currently used.

Value

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


tsmodels/tsissm documentation built on June 22, 2022, 6:57 a.m.