Simulation of an AR(2) time series.
Returns a simulated time series that fulfills the following equation: [REMOVE_ME]
where and are parameters and is independent white noise with marginal distribution specified by the parameter innov
.
AR2(n, a1, a2, overhead = 500, innov = rnorm)
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 n
that yields n
independent pseudo random numbers each time it is called.
Return an AR(2) time series with specified parameters.
Returns a simulated time series that fulfills the following equation:
where and are parameters and is independent white noise with marginal distribution specified by the parameter innov
.
plot(AR2(100, a1=0, a2=0.5), type="l")