TARMA.sim | R Documentation |
TARMA(p1,p2,q1,q2)
processSimulates from the following two-regime TARMA(p1,p2,q1,q2)
process:
X_t = \left\lbrace \beginarrayll \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\mathrmif\quad X_t-d \leq \mathrmthd \\\ &\\\ \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\mathrmif\quad X_t-d > \mathrmthd \endarray \right. X[t] = = \phi[1,0] + \phi[1,1]X[t-1] + ... + \phi[1,p1]X[t-p1] + \theta[1,1]\epsilon[t-1] + ... + \theta[1,q]\epsilon[t-q1] + \epsilon[t] – if X[t-d] <= thd
= \phi[2,0] + \phi[2,1]X[t-1] + ... + \phi[2,p2]X[t-p2] + \theta[2,1]\epsilon[t-1] + ... + \theta[2,q]\epsilon[t-q2] + \epsilon[t] – if X[t-d] > thd
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, ...),
...
)
n |
Length of the series. |
phi1 |
Vector of |
phi2 |
Vector of |
theta1 |
Vector of |
theta2 |
Vector of |
d |
Delay parameter. Defaults to |
thd |
Threshold parameter. Defaults to |
s1 |
Innovation variance for the lower regime. Defaults to |
s2 |
Innovation variance for the upper regime. Defaults to |
rand.gen |
Optional: a function to generate the innovations. Defaults to |
innov |
Optional: a time series of innovations. If not provided, |
n.start |
Length of the burn-in period. Defaults to |
xstart |
Initial condition as a named list: |
start.innov |
Optional: a time series of innovations for the burn-in period. |
... |
Additional arguments for |
Note that the parameters are not checked for ergodicity.
A time series object of class ts
generated from the above model.
Simone Giannerini, simone.giannerini@uniud.it
Greta Goracci, greta.goracci@unibz.it
Gia21tseriesTARMA
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.