| arima.sim {ts} | R Documentation |
Simulate from an ARIMA Model
Description
Simulate from an ARIMA model.
Usage
arima.sim(model, n, rand.gen = rnorm, innov = rand.gen(n, ...),
n.start = NA, ...)
Arguments
model |
A list with component |
n |
length of output series. |
rand.gen |
optional: a function to generate the innovations. |
innov |
an optional times series of innovations. If not
provided, |
n.start |
length of “burn-in” period. If |
... |
additional arguments for |
Details
The ARMA model is checked for stationarity.
ARIMA models are specified via the order component of
model, in the same way as for arima. Other
aspects of the order component are ignored.
Value
A time-series object of class "ts".
See Also
arima.sim
Examples
arima.sim(n = 63, list(ar = c(0.8897, -0.4858), ma = c(-0.2279, 0.2488)),
sd = sqrt(0.1796))
# mildly long-tailed
arima.sim(n = 63, list(ar=c(0.8897, -0.4858), ma=c(-0.2279, 0.2488)),
rand.gen = function(n, ...) sqrt(0.1796) * rt(n, df = 5))
# An ARIMA simulation
ts.sim <- arima.sim(list(order = c(1,1,0), ar = 0.7), n = 200)
ts.plot(ts.sim)