| sim.tfm | R Documentation |
Generates random time series from ARIMA (um) or transfer function (tfm) models.
## S3 method for class 'tfm'
sim(
mdl,
n = 100,
z0 = NULL,
n0 = 0,
a = NULL,
seed = NULL,
envir = parent.frame(),
...
)
sim(mdl, ...)
## S3 method for class 'um'
sim(
mdl,
n = 100,
z0 = NULL,
n0 = 0,
a = NULL,
seed = NULL,
envir = parent.frame(),
...
)
mdl |
An object of class |
n |
Number of observations to simulate. |
z0 |
Initial conditions for nonstationary series. Default is |
n0 |
Number of initial observations to discard as burn-in. Default is |
a |
Optional vector of innovations with length |
seed |
Random seed for reproducibility. |
envir |
Environment for argument evaluation. Default is |
... |
Additional arguments. |
A ts object with the simulated time series.
sim.um, sim.tfm
# AR(1) model
mdl1 <- um(ar = "1 - 0.8B", sig2 = 1)
z1 <- sim(mdl1, n = 100, seed = 123)
# ARIMA(0,1,1) with burn-in
mdl2 <- um(i = 1, ma = "1 - 0.5B", sig2 = 1)
z2 <- sim(mdl2, n = 100, n0 = 50, seed = 456)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.