Running examples in ‘tsDyn-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: TVAR
> ### Title: Multivariate Threshold Autoregressive model
> ### Aliases: TVAR OlsTVAR
> ### Keywords: ts
> 
> ### ** Examples
> 
> 
> data(zeroyld)
> 
> tv <- TVAR(zeroyld, lag=2, nthresh=2, thDelay=1, trim=0.1, mTh=1, plot=FALSE)
Best unique threshold 10.653 
Second best: 8.124 (conditionnal on th= 10.653 and Delay= 1 ) 	 SSR/AIC: 164.1456
Second best: 10.653 (conditionnal on th= 8.124 and Delay= 1 ) 	 SSR/AIC: 164.1456

Second step best thresholds 8.124 10.653 		 SSR: 164.1456 
> 
> print(tv)
Model TVAR with  2  thresholds

$Bdown
                     Intercept short.run -1 long.run -1 short.run -2
Equation short.run  0.01496509    1.0061051  0.03855754 -0.007405335
Equation long.run  -0.03467035    0.3622364  1.02090855 -0.287156749
                   long.run -2
Equation short.run -0.03455587
Equation long.run  -0.09201102

$Bmiddle
                    Intercept short.run -1 long.run -1 short.run -2 long.run -2
Equation short.run -0.2169119   0.83059144   0.0127026   0.13505057  0.04939883
Equation long.run  -0.1386902  -0.02142815   0.8490303   0.02085644  0.16932567

$Bup
                   Intercept short.run -1 long.run -1 short.run -2 long.run -2
Equation short.run  1.561918    1.1780904 -0.03076567   -0.3468208  0.06986963
Equation long.run   2.037192    0.7989221  0.81823826   -0.8562527  0.05771228


Threshold value[1] "8.124 10.653"
> summary(tv)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
tsDyn
 --- call from context --- 
asListIfMat(VarCovB)
 --- call from argument --- 
if (class(x) == "matrix") return(list(x)) else return(x)
 --- R stacktrace ---
where 1: asListIfMat(VarCovB)
where 2: summary.TVAR(tv)
where 3: summary(tv)

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (x) 
{
    if (class(x) == "matrix") 
        return(list(x))
    else return(x)
}
<bytecode: 0x55a7264d6180>
<environment: namespace:tsDyn>
 --- function search by body ---
Function asListIfMat in namespace tsDyn has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1