Simulation of an AR(1) time series.
Returns a simulated time series that fulfills the following equation: [REMOVE_ME]
where is a parameter and is independent white noise with marginal distribution specified by the parameter innov
.
AR1(n, a, overhead = 500, innov = rnorm)
n
: length of the time series to be returneda
: parameter of the modeloverhead
: an integer specifying the ``warmup'' period to reach an approximate stationary start for the times seriesinnov
: a function that generates a random number each time innov(1)
is called; used to specify the distribution of the innovations; rnorm
by defaultReturns an AR(1) time series with specified parameters.
Returns a simulated time series that fulfills the following equation:
where is a parameter and is independent white noise with marginal distribution specified by the parameter innov
.
plot(AR1(100, a=-0.7), type="l")