Am 01.02.2019 um 04:15 schrieb Allin Cottrell:
 So I think we await a fully-specified example of disagreement between
 R::urca and R::tsDyn or gretl. 
I have now used Reynaldo's original example and turned it into a script. 
The data are attached in gretl format for convenience.
(Note that I had difficulties getting the exogenous variable into 
tsDyn's rank.test, I believe there may be a small bug there. Hence my 
workaround with as.matrix and drop=F.)
<hansl>
open CI_testdata.gdt
coint2 6 GDP NDB; Bdum --quiet # Bdum dummy renamed from bnprivfinance
foreign language=R --send-data
   require(tsDyn)
   cidat <- gretldata[, c("GDP","NDB")]
   exo <- as.matrix(gretldata[, c("Bdum")], drop=F)	# bnprivfinance
   ve <- VECM(cidat, lag=5, estim="ML", include="const",
exogen=exo)
   ve_test0 <- rank.test(ve, r_null=0, type="trace")
   ve_test0
   ve_test1 <- rank.test(ve, r_null=1, type="trace")
   ve_test1
   require(urca)
   test2 <- ca.jo(cidat, type="trace", K=6, ecdet=c("none"),
dumvar=exo)
   summary(test2)
end foreign
</hansl>
Here's (parts of) the output:
Gretl (German, but I guess it's obvious):
Rang Eigenwert Trace-Test  p-Wert  Lmax-Test  p-Wert
    0    0.30870     26.346 [0.0006]     20.674 [0.0033]
    1   0.096321     5.6718 [0.0172]     5.6718 [0.0172]
tsDyn:
Test of rank 0 versus 2  (trace test), p-value: 0.0005827881.
Test of rank 1 versus 2  (trace test), p-value: 0.01724008.
urca:
           test 10pct  5pct  1pct
r <= 1 |  5.67  6.50  8.18 11.65
r = 0  | 26.35 15.66 17.95 23.52
So that's the differing conclusions from the OP, and Gretl and tsDyn 
again agree, urca doesn't. (And BTW, I'm speculating that a comparison 
of 26.35 with urca's 1% crit. value 23.5 wouldn't give a p-value below 
.001, but who knows).
Finally, let me add that this is just a comparison of the mechanical 
workings of the tools. All those results are likely invalid because the 
test is not valid in general with such an unrestricted exogenous 
variable which is not an impulse dummy, but is modeling some breaks or 
thresholds.
cheers,
sven