TVAR.LRtest(data, lag=1, trend=TRUE, series, thDelay = 1:m, mTh=1, thVar, nboot=10, plot=FALSE, trim=0.1, test=c("1vs", "2vs3"), model=c("TAR", "MTAR"), hpc=c("none", "foreach"), trace=FALSE, check=FALSE)
TVECM.HStest
-The values of each LR test
-The bootstrap Pvalues and critical values for the test selected
$$LR_{ij}=T( ln(\det \hat \Sigma_{i}) -ln(\det \hat \Sigma_{j}))$$ where $\hat \Sigma_{i}$ is the estimated covariance matrix of the model with i regimes (and so i-1 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.
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.
setarTest
for the univariate version. OlsTVAR
for estimation of the model.data(zeroyld)
data<-zeroyld
TVAR.LRtest(data, lag=2, mTh=1,thDelay=1:2, nboot=3, plot=FALSE, trim=0.1, test="1vs")
Run the code above in your browser using DataLab