data.gen.tar: Generate a two-regime threshold autoregressive (TAR) process. In synthesis: Generate Synthetic Data from Statistical Models

Description

Generate a two-regime threshold autoregressive (TAR) process.

Usage

 ``` 1 2 3 4 5 6 7 8 9 10``` ```data.gen.tar( nobs, ndim = 9, phi1 = c(0.6, -0.1), phi2 = c(-1.1, 0), theta = 0, d = 2, p = 2, noise = 0.1 ) ```

Arguments

 `nobs` the data length to be generated `ndim` The number of potential predictors (default is 9) `phi1` the coefficient vector of the lower-regime model `phi2` the coefficient vector of the upper-regime model `theta` threshold `d` delay `p` maximum autoregressive order `noise` the white noise in the data

Details

The two-regime Threshold Autoregressive (TAR) model is given by the following formula:

Y_t = φ_{1,0}+φ_{1,1} Y_{t-1} +…+ φ_{1,p} Y_{t-p}+σ_1 e_t, \mbox{ if } Y_{t-d}≤ r

Y_t = φ_{2,0}+φ_{2,1} Y_{t-1} +…+ φ_{2,p} Y_{t-p}+σ_2 e_t, \mbox{ if } Y_{t-d} > r.

where r is the threshold and d the delay.

Value

A list of 2 elements: a vector of response (x), and a matrix of potential predictors (dp) with each column containing one potential predictor.

References

Cryer, J. D. and K.-S. Chan (2008). Time Series Analysis With Applications in R Second Edition Springer Science+ Business Media, LLC.

Examples

 ```1 2 3``` ```# TAR2 model from paper with total 9 dimensions data.tar<-data.gen.tar(500) plot.ts(cbind(data.tar\$x,data.tar\$dp)) ```

synthesis documentation built on Nov. 27, 2021, 5:07 p.m.