Hi, Matthieu
Recently I am trying to use TVECM in my paper. When I write "nthresh=2" in Rstudio, an error happens and it is listed below.
library(tsDyn)
#> Registered S3 method overwritten by 'quantmod'
#> method from
#> as.zoo.data.frame zoo
packageVersion("tsDyn")
#> [1]11.0.2
price<-read_excel("E:/spot and futures price.xlsx")
tvec<-TVECM(price,nthresh=2,lag=2,ngridBeta=300,ngridTh=300,plot=TRUE,trim=0.05,common="All")
#> error in allgammas[seq(from=wh.thresh + ninter, to=length(allgammas) - :only 0's may be mixed with negative subscripts
However, R runs smoothly if nthresh is set to 1. Could you please fix the bug?
Best
Xi
Hi, Matthieu
Recently I am trying to use TVECM in my paper. When I write "nthresh=2" in Rstudio, an error happens and it is listed below.
library(tsDyn)
#> Registered S3 method overwritten by 'quantmod'
#> method from
#> as.zoo.data.frame zoo
packageVersion("tsDyn")
#> [1]11.0.2
price<-read_excel("E:/spot and futures price.xlsx")
tvec<-TVECM(price,nthresh=2,lag=2,ngridBeta=300,ngridTh=300,plot=TRUE,trim=0.05,common="All")
#> error in allgammas[seq(from=wh.thresh + ninter, to=length(allgammas) - :only 0's may be mixed with negative subscripts
However, R runs smoothly if nthresh is set to 1. Could you please fix the bug?
Best
Xi