Hi
There is no Granger test implemented straight out of the box, but as it is usually testes using the Wald test you can do it rather easily. Extracting the var-cov matrix is with vcov(), and to get the coefs in a vector, use function below.
Let me know how that goes for you!?
library(tsDyn)
data(zeroyld)
tv <- TVAR(zeroyld, lag=1, nthresh=1, thDelay=1, trim=0.1, mTh=1, plot=TRUE)
coefVec <- function(x){
coef_M <- x$coeffmat
coef_c <- matrix(t(coef_M), ncol=1, byrow = FALSE)
rownames(coef_c) <- paste(colnames(coef_M), rep(rownames(coef_M), each=ncol(coef_M)))
coef_c
}
## wald test for all zero:
t(coefVec(x=tv))%*% vcov(tv) %*% coefVec(x=tv)
Matthieu