Skip to content

TVECM does not work with two threshold values #42

@Justinxi

Description

@Justinxi

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

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions