sim_NVAR {NVAR}R Documentation

Time series simulation with an NVAR model

Description

Time series simulation with an NVAR model

Usage

sim_NVAR(
  model,
  init = NULL,
  length = 1000,
  noise = 0,
  upper_lim = Inf,
  lower_lim = -Inf
)

Arguments

model

An NVAR model, fitted by NVAR().

init

A tibble, data.frame, or matrix that specify the initial values for a simulation. Should contain the variables used to fit the model and be at least s * (k - 1) long. NULL by default, in which case the data used for fitting the model will be used for simulation.

length

How many time steps should be simulated? 1e3 by default.

noise

A number indicating the standard deviation of the Gaussian noise added to each time step. 0 by default (no noise).

upper_lim, lower_lim

The upper and lower limit for the simulation. Once the simulated value is out of the limits, it will be taken back to avoid instability of the simulation. Both should either be a single number or a numeric vector with the same length as the number of variables in the model. Inf and -Inf by default, which means no limits.

Value

A tibble with the simulated time series.


[Package NVAR version 0.1.0 Index]