rtvvar: Simulation of Time Series with Time-varying Variance

Description Usage Arguments Details Value Author(s) References Examples

View source: R/rtvvar.R

Description

Simulating time-varying variance based on TV-VAR model

Usage

1
rtvvar(n, alpha, beta = 1, simple = FALSE)

Arguments

n

Length of the time series

alpha

Parameter α in TV-VAR

beta

Parameter β in TV-VAR. Default is 1.

simple

A logical vector indicating whether h_t is considered as its own process, or just t/T. Default is FALSE.

Details

Time varying variance (TV-VAR) process x_t with parameters α and β is of the form

x_t = hm_t ε_t,

where, if simple = FALSE,

hm_t^2 = h_t^2 + α x_(t-1)^2,

where ε are iid N(0,1), x_0 = 0 and h_t = 10 - 10 sin(β π t/T + π/6) (1 + t/T),

and if simple = TRUE,

hm_t = t/T.

Value

The simulated series as a ts object.

Author(s)

Sara Taskinen, Markus Matilainen

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

1
2
3
n <- 5000
X <- rtvvar(n, alpha = 0.2, beta = 0.5, simple = FALSE)
plot(X)

ssaBSS documentation built on April 12, 2021, 9:06 a.m.