ts-models-AR1 {quantspec} | R Documentation |
Simulation of an AR(1) time series.
Description
Returns a simulated time series (Y_t)
that fulfills the following equation:
Y_t = a Y_{t-1} + \epsilon_t,
where a
is a parameter and \epsilon_t
is independent white
noise with marginal distribution specified by the parameter innov
.
Usage
AR1(n, a, overhead = 500, innov = rnorm)
Arguments
n |
length of the time series to be returned |
a |
parameter of the model |
overhead |
an integer specifying the “warmup” period to reach an approximate stationary start for the times series |
innov |
a function that generates a random number each time
|
Value
Returns an AR(1) time series with specified parameters.
Examples
plot(AR1(100, a=-0.7), type="l")
[Package quantspec version 1.2-4 Index]