Learn R Programming

quantspec (version 1.0-0)

ts-models-QAR1: Simulation of an QAR(1) time series.

Description

Returns a simulated time series $(Y_t)$ that fulfills the following equation: $$Y_t = \theta_1(U_t) Y_{t-1} + \theta_0(U_t),$$ where $\theta_1$ and $\theta_0$ are parameters and $U_t$ is independent white noise with uniform $[0,1]$ marginal distributions.

Usage

QAR1(n, th1 = function(u) {     1.9 * ((u - 0.5)) }, overhead = 1000,
  th0 = qnorm)

Arguments

n
length of the time series to be returned
th1
parameter function with one argument u defined on $[0,1]$
th0
parameter function with one argument u defined on $[0,1]$
overhead
an integer specifying the ``warmup'' period to reach an approximate stationary start for the times series

Value

  • Returns an QAR(1) time series with specified parameters.

Examples

Run this code
plot(QAR1(100), type="l")

Run the code above in your browser using DataLab