Learn R Programming

ssaBSS (version 0.1.1)

rtvAR1: Simulation of Time Series with Time-varying Autocovariance

Description

Simulating time-varying variance based on TV-AR1 model

Usage

rtvAR1(n, sigma = 0.93)

Value

The simulated series as a ts object.

Arguments

n

Length of the time series

sigma

Parameter \(\sigma^2\) in TV-AR1, i.e. the variance. Default is 0.93.

Author

Sara Taskinen, Markus Matilainen

Details

Time varying autoregressive processes of order 1 (TV-AR1) is $$x_t = a_t x_{t-1} + \epsilon_t,$$ with \(x_0=0\), \(\epsilon_t\) is iid \(N(0, \sigma^2)\) and \(a_t = 0.5\cos(2\pi t/T)\).

References

Patilea V. and Raïssi H. (2014) Testing Second-Order Dynamics for Autoregressive Processes in Presence of Time-Varying Variance, Journal of the American Statistical Association, 109 (507), 1099-1111.

Examples

Run this code

n <- 5000
X <- rtvAR1(n, sigma = 0.93)
plot(X)

Run the code above in your browser using DataLab