reg.thr.norm {TAR} | R Documentation |
Identify the number of regimes and the corresponding thresholds for a Gaussian TAR model.
Description
This function identify the number of regimes and the corresponding thresholds for a TAR model with Gaussian noise process.
Usage
reg.thr.norm(Z, X, n.sim = 500, p.burnin = 0.2, n.thin = 1)
Arguments
Z |
The threshold series |
X |
The series of interest |
n.sim |
Number of iteration for the Gibbs Sampler |
p.burnin |
Percentage of iterations used for Burn-in |
n.thin |
Thinnin factor for the Gibbs Sampler |
Details
The TAR model is given by
when for som
(
).
the
is the threshold process,
is the number of regimes,
is the autoregressive order in the regime
.
with
denote the autoregressive coefficients, while
denote the variance weights.
is the Gaussian white noise process
.
Value
The function returns the identified number of regimes with posterior probabilities and the thresholds with credible intervals.
Author(s)
Hanwen Zhang <hanwenzhang at usantotomas.edu.co>
References
Nieto, F. H. (2005), Modeling Bivariate Threshold Autoregressive Processes in the Presence of Missing Data. Communications in Statistics. Theory and Methods, 34; 905-930
See Also
Examples
set.seed(12345678)
# Example 1, TAR model with 2 regimes
Z<-arima.sim(n=300,list(ar=c(0.5)))
l <- 2
r <- 0
K <- c(2,1)
theta <- matrix(c(1,-0.5,0.5,-0.7,-0.3,NA), nrow=l)
H <- c(1, 1.5)
X <- simu.tar.norm(Z,l,r,K,theta,H)
#res <- reg.thr.norm(Z,X)
#res$L.est
#res$L.prob
#res$R.est
#res$R.CI