Param.norm: Estimate a Gaussian TAR model using Gibbs Sampler given the...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/Param.norm.R

Description

This function estimate a Gaussian TAR model using Gibbs Sampler given the structural parameters, i.e. the number of regimes, thresholds and autoregressive orders.

Usage

1
Param.norm(Z, X, l, r, K, n.sim = 500, p.burnin = 0.2, n.thin = 3)

Arguments

Z

The threshold series

X

The series of interest

l

The number of regimes.

r

The vector of thresholds for the series \{Z_t\}.

K

The vector containing the autoregressive orders of the l regimes.

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

X_t=a_0^{(j)} + ∑_{i=1}^{k_j}a_i^{(j)}X_{t-i}+h^{(j)}e_t

when Z_t\in (r_{j-1},r_j] for som j (j=1,\cdots,l). the \{Z_t\} is the threshold process, l is the number of regimes, k_j is the autoregressive order in the regime j. a_i^{(j)} with i=0,1,\cdots,k_j denote the autoregressive coefficients, while h^{(j)} denote the variance weights. \{e_t\} is the Gaussian white noise process N(0,1).

Value

The function returns the autoregressive coefficients matrix theta and variance weights H. Rows of the matrix theta represent regimes

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

LS.norm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 # Example 1, TAR model with 2 regimes
Z<-arima.sim(n=500,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 <- Param.norm(Z,X,l,r,K)

# Example 2, TAR model with 3 regimes
Z<-arima.sim(n=300, list(ar=c(0.5)))
l <- 3
r <- c(-0.6, 0.6)
K <- c(1, 2, 1)
theta <- matrix(c(1,0.5,-0.5,-0.5,0.2,-0.7,NA, 0.5,NA), nrow=l)
H <- c(1, 1.5, 2)
X <- simu.tar.norm(Z, l, r, K, theta, H)
# res <- Param.norm(Z,X,l,r,K)

Example output

Loading required package: mvtnorm

TAR documentation built on May 2, 2019, 3:40 a.m.

Related to Param.norm in TAR...