TARMA.sim {tseriesTARMA}R Documentation

Simulation of a two-regime TARMA(p1,p2,q1,q2) process

Description

Simulates from the following two-regime TARMA(p1,p2,q1,q2) process:

\[X_{t} = \left\lbrace \begin{array}{ll} \phi_{1,0} + \sum_{i=1}^{p_1} \phi_{1,i} X_{t-i} + \sum_{j=1}^{q_1} \theta_{1,j} \varepsilon_{t-j} + \varepsilon_{t}, & \quad\mathrm{if}\quad X_{t-d} \leq \mathrm{thd} \\ &\\ \phi_{2,0} + \sum_{i=1}^{p_2} \phi_{2,i} X_{t-i} + \sum_{j=1}^{q_2} \theta_{2,j} \varepsilon_{t-j} + \varepsilon_{t}, & \quad\mathrm{if}\quad X_{t-d} > \mathrm{thd} \end{array} \right. \]

Usage

TARMA.sim(
  n,
  phi1,
  phi2,
  theta1,
  theta2,
  d = 1,
  thd = 0,
  s1 = 1,
  s2 = 1,
  rand.gen = rnorm,
  innov = rand.gen(n, ...),
  n.start = 500,
  xstart,
  start.innov = rand.gen(n.start, ...),
  ...
)

Arguments

n

Length of the series.

phi1

Vector of p1+1 Autoregressive parameters of the lower regime. The first element is the intercept.

phi2

Vector of p2+1 Autoregressive parameters of the upper regime. The first element is the intercept.

theta1

Vector of q1 Moving Average parameters of the lower regime.

theta2

Vector of q2 Moving Average parameters of the upper regime.

d

Delay parameter. Defaults to 1.

thd

Threshold parameter. Defaults to 0.

s1

Innovation variance for the lower regime. Defaults to 1.

s2

Innovation variance for the upper regime. Defaults to 1.

rand.gen

Optional: a function to generate the innovations. Defaults to rnorm.

innov

Optional: a time series of innovations. If not provided, rand.gen is used.

n.start

Length of the burn-in period. Defaults to 500.

xstart

Initial condition as a named list:
$ar: AR part length k = max(p1,p2,d), X[k], X[k-1], ... ,X[1];
$ma: MA part length q = ma.ord, e[q], ... , e[1].

start.innov

Optional: a time series of innovations for the burn-in period.

...

Additional arguments for rand.gen.

Details

Note that the parameters are not checked for ergodicity.

Value

A time series object of class ts generated from the above model.

Author(s)

Simone Giannerini, simone.giannerini@unibo.it

Greta Goracci, greta.goracci@unibz.it

References

Examples

## a TARMA(1,1,1,1) model
set.seed(123)
x <- TARMA.sim(n=100, phi1=c(0.5,-0.5), phi2=c(0.0,0.8), theta1=-0.5, theta2=0.5, d=1, thd=0.2)

## a TARMA(1,2,1,1) model
x <- TARMA.sim(n=100,phi1=c(0.5,-0.5,0),phi2=c(0,0.5,0.3),theta1=-0.5,theta2=0.5,d=1,thd=0.2)


[Package tseriesTARMA version 0.3-4 Index]