ts-models-AR1: Simulation of an AR(1) time series.

Description Usage Arguments Value Examples

Description

Returns a simulated time series (Y_t) that fulfills the following equation:

Y_t = a Y_{t-1} + ε_t,

where a is a parameter and ε_t is independent white noise with marginal distribution specified by the parameter innov.

Usage

1
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 innov(1) is called; used to specify the distribution of the innovations; rnorm by default

Value

Returns an AR(1) time series with specified parameters.

Examples

1
plot(AR1(100, a=-0.7), type="l")

quantspec documentation built on July 15, 2020, 1:07 a.m.