TVECM: Threshold Vector Error Correction model (VECM)

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

View source: R/TVECM.R

Description

Estimate a Threshold Vector Error Correction model (VECM)

Usage

1
2
3
4
5
6
7
8
TVECM(data, lag = 1, nthresh = 1, trim = 0.05, ngridBeta = 50,
  ngridTh = 50, plot = TRUE, th1 = list(exact = NULL, int = c("from",
  "to"), around = "val"), th2 = list(exact = NULL, int = c("from", "to"),
  around = "val"), beta = list(exact = NULL, int = c("from", "to"), around =
  c("val", "by")), restr = c("none", "equal", "signOp"), common = c("All",
  "only_ECT"), include = c("const", "trend", "none", "both"),
  dummyToBothRegimes = TRUE, beta0 = 0, methodMapply = FALSE,
  trace = TRUE)

Arguments

data

time series

lag

Number of lags to include in each regime

nthresh

number of threshold (see details)

trim

trimming parameter indicating the minimal percentage of observations in each regime

ngridBeta

number of elements to search for the cointegrating value

ngridTh

number of elements to search for the threshold value

plot

Whether the grid with the SSR of each threshold should be ploted.

th1

different possibilities to pre-specify an exact value, an interval or a central point for the search of the threshold (or first threshold if nthresh=2)

th2

different possibilities to pre-specify an exact value or a central point for the search of the second threshold (used only if nthresh=2)

beta

different possibilities to pre-specify an exact value, an interval or a central point for the search of the cointegrating value

restr

Currently not avalaible

common

Whether the regime-specific dynamics are only for the ECT or for the ECT and the lags

include

Type of deterministic regressors to include

dummyToBothRegimes

Whether the dummy in the one threshold model is applied to each regime or not.

beta0

Additional regressors to include in the cointegrating relation

methodMapply

only for programming. Is to make the choice between a for loop or mapply implementation

trace

should additional infos be printed? (logical)

Details

For fixed threshold and cointegrating vector, the model is linear, so estimation of the regression parameters can be done directly by CLS (Conditional Least Squares). The search of the threshold and cointegrating parameters values which minimize the residual sum of squares (SSR) is made on a grid of potential values. For specification of the grids, see below.

The function can estimate one as well as two thresholds:

nthresh=1:

estimation of one threshold model (two regimes) upon a grid of ngridTh values (default to ALL) possible thresholds and delays values.

nthresh=2:

estimation of two thresholds model (three regimes). Conditional on the threshold found in model where nthresh=1, the second threshold is searched. When both are found, a second grid search is made with 30 values around each threshold.

The model can be either with a threshold effect on all variables ("All") or only on the error correction term (ECT) (argument "only ECT"). In the second case, the value for the middle threshold is taken a null, as in Balke and Fomby (1997).

The grid for the threshold parameters can be set in different ways, through the argument th1, th2 and beta:

exact:

Pre-specified value (for beta: cointegrating vector will be c(1,-beta))

int:

Specify an interval (of length ngridTh) in which to search.

around:

Specify to take ngridTh points around the value given.

The default is to do an interval search. Interval bounds for the threshold interval are simply the trim and 1-trim percents of the sorted error correction term. For the cointegrating parameter, bounds of the interval are obtained from the (OLS) confidence interval of the linear cointegration case. It is often found however that this interval is too tight. It is hence recommended to inspect the plot of the grid search.

Value

Fitted model data

Author(s)

Matthieu Stigler

References

Hansen, B. and Seo, B. (2002), Testing for two-regime threshold cointegration in vector error-correction models, Journal of Econometrics, 110, pages 293 - 318

Seo, M. H. (2009) Estimation of non linear error-correction models, Working paper

See Also

VECM for the linear VECM, TVAR for the threshold VAR, TVECM.SeoTest to test for TVECM, TVECM.sim to simulate/bootstrap a TVECM.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(zeroyld)

##Estimate a TVECM (we use here minimal grid, it should be usually much bigger!)

tvec <- TVECM(zeroyld, nthresh=2,lag=1, ngridBeta=20, ngridTh=30, plot=TRUE,trim=0.05, common="All")

print(tvec)
summary(tvec)

#Obtain diverse infos:
AIC(tvec)
BIC(tvec)

res.tvec<-residuals(tvec)

#export the equations as Latex:
toLatex(tvec)

tsDyn documentation built on June 4, 2018, 1:04 a.m.