You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to estimate a TVAR model that includes an external threshold variable but the TVAR.LRtest function is only working for "1vs" but not for "2vs3".
#codes examples
Y<- TVAR.LRtest(X ,
lag=2,
trend=TRUE,
thVar=diff(Z),
thDelay=1,
nboot=100, plot=FALSE, trim=0.15,test="2vs3")
Error in if (round(z2[i - bestDelay], ndig) <= bestThresh) { :
missing value where TRUE/FALSE needed
The text was updated successfully, but these errors were encountered:
Thanks for sharing the issue (though your example was neither minimum nor self-reproducible example, in the future see https://stackoverflow.com/help/minimal-reproducible-example), but here is a reprex confirming that you found a bug. I am quite busy so not sure when I will be able to fix it.
library(tsDyn)
#> Registered S3 method overwritten by 'quantmod':#> method from#> as.zoo.data.frame zoo
data(barry)
Y<- TVAR.LRtest(barry[,1:2],
thVar=barry[,3],
plot=FALSE, test="1vs")
#> Warning: the thDelay values do not correspond to the univariate implementation in tsdynY<- TVAR.LRtest(barry[,1:2],
thVar=barry[,3],
plot=FALSE, test="2vs3")
#> Warning: the thDelay values do not correspond to the univariate implementation in tsdyn#> Error in if (round(z2[i - bestDelay], ndig) <= bestThresh) {: missing value where TRUE/FALSE needed
I want to estimate a TVAR model that includes an external threshold variable but the TVAR.LRtest function is only working for "1vs" but not for "2vs3".
#codes examples
Y<- TVAR.LRtest(X ,
lag=2,
trend=TRUE,
thVar=diff(Z),
thDelay=1,
nboot=100, plot=FALSE, trim=0.15,test="2vs3")
Error in if (round(z2[i - bestDelay], ndig) <= bestThresh) { :
missing value where TRUE/FALSE needed
The text was updated successfully, but these errors were encountered: