Estimate a multivariate Threshold VAR (TVAR), either using lags as transition variable (default), or specifying an external variable.
TVAR(
data,
lag,
include = c("const", "trend", "none", "both"),
model = c("TAR", "MTAR"),
commonInter = FALSE,
nthresh = 1,
thDelay = 1,
mTh = 1,
thVar,
trim = 0.1,
ngrid,
gamma = NULL,
around,
plot = FALSE,
dummyToBothRegimes = TRUE,
trace = TRUE,
trick = "for",
max.iter = 2
)
An object of class TVAR, with standard methods.
time series
Number of lags to include in each regime
Type of deterministic regressors to include
Whether the transition variable is taken in levels (TAR) or difference (MTAR)
Whether the deterministic regressors are regime specific
(commonInter
=FALSE) or not.
Number of thresholds
'time delay' for the threshold variable (as multiple of embedding time delay d) PLEASE NOTE that the notation is currently different to univariate models in tsDyn. The left side variable is taken at time t, and not t+1 as in univariate cases.
combination of variables with same lag order for the transition variable. Either a single value (indicating which variable to take) or a combination
Optional. External transition variable.
trimming parameter indicating the minimal percentage of observations in each regime
number of elements of the grid, especially for nthresh=3
prespecified threshold values
The grid search is restricted to ngrid values around this
point. Especially useful for nthresh=3
.
Whether a plot showing the results of the grid search should be printed
Whether the dummy in the one threshold model is applied to each regime or not.
should additional infos be printed out?
type of R function called: for
or mapply
Number of iterations for the algorithm
Matthieu Stigler
For fixed th
and threshold variable, the model is linear, so
estimation can be done directly by CLS (Conditional Least Squares). The
search of the parameters values is made upon a grid of potential values. So
it is pretty slow.
nthresh=1: estimation of one threshold model (two regimes) upon a grid of ngrid 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.
nthresh=3: DOES NOT estimate a 3 thresholds model, but a 2 thresholds model with a whole grid over the thresholds parameters (so is really slow) with a given delay, is there rather to check the consistency of the method nthresh=2
Lo and Zivot (2001) "Threshold Cointegration and Nonlinear Adjustment to the Law of One Price," Macroeconomic Dynamics, Cambridge University Press, vol. 5(4), pages 533-76, September.
lineVar
for the linear VAR/VECM,
TVAR.LRtest
to test for TVAR, TVAR.sim
to
simulate/bootstrap a TVAR.
data(zeroyld)
tv <- TVAR(zeroyld, lag=2, nthresh=2, thDelay=1, trim=0.1, mTh=1, plot=FALSE)
print(tv)
summary(tv)
# a few useful methods:
plot(tv)
predict(tv)
c(AIC(tv), BIC(tv), logLik(tv))
Run the code above in your browser using DataLab