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