Multivariate extension of the linearity against threshold test from Hansen (1999) with bootstrap distribution
1 2 3 4 
data 
multivariate time series 
lag 
Number of lags to include in each regime 
trend 
whether a trend should be added 
series 
name of the series 
thDelay 
'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. 
mTh 
combination of variables with same lag order for the transition variable. Either a single value (indicating which variable to take) or a combination 
thVar 
external transition variable 
nboot 
Number of bootstrap replications 
plot 
Whether a plot showing the results of the grid search should be printed 
trim 
trimming parameter indicating the minimal percentage of observations in each regime 
test 
Type of usual and alternative hypothesis. See details 
model 
Whether the threshold variable is taken in level (TAR) or difference (MTAR) 
hpc 
Possibility to run the bootstrap on parallel core. See details in

trace 
should additional infos be printed? (logical) 
check 
Possibility to check the function by no sampling: the test value should be the same as in the original data 
This test is just the multivariate extension proposed by Lo and Zivot of the linearity test of Hansen (1999). As in univariate case, estimation of the first threshold parameter is made with CLS, for the second threshold a conditional search with one iteration is made. Instead of a Ftest comparing the SSR for the univariate case, a Likelihood Ratio (LR) test comparing the covariance matrix of each model is computed.
LR_{ij}=T( ln(\det \hat Σ_{i}) ln(\det \hat Σ_{j}))
where \hat Σ_{i} is the estimated covariance matrix of the model with i regimes (and so i1 thresholds).
Three test are avalaible. The both first can be seen as linearity test, whereas the third can be seen as a specification test: once the 1vs2 or/and 1vs3 rejected the linearity and henceforth accepted the presence of a threshold, is a model with one or two thresholds preferable?
Test 1vs2: Linear VAR versus 1 threshold TVAR
Test 1vs3: Linear VAR versus 2 threshold2 TVAR
Test 2vs3: 1 threshold TAR versus 2 threshold2 TAR
The both first are computed together and avalaible with test="1vs". The third test is avalaible with test="2vs3".
The homoskedastik bootstrap distribution is based on resampling the residuals from H0 model, estimating the threshold parameter and then computing the Ftest, so it involves many computations and is pretty slow.
A list containing:
The values of each LR test
The bootstrap Pvalues and critical values for the test selected
Matthieu Stigler
Hansen (1999) Testing for linearity, Journal of Economic Surveys, Volume 13, Number 5, December 1999 , pp. 551576(26) avalaible at: http://www.ssc.wisc.edu/~bhansen/papers/cv.htm
Lo and Zivot (2001) "Threshold Cointegration and Nonlinear Adjustment to the Law of One Price," Macroeconomic Dynamics, Cambridge University Press, vol. 5(4), pages 53376, September.
setarTest
for the univariate version.
OlsTVAR
for estimation of the model.
1 2 3 4 
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.