R Under development (unstable) (2024-10-26 r87273 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(tsDyn) > > data(zeroyld) > > ###Estimate models: VAR > linVar<-lineVar(zeroyld, lag=2) > tsDyn:::toMlm.nlVar(linVar) Call: lm(formula = Yt ~ . - 1, data = Ytminusi) Coefficients: short.run long.run Intercept 0.067291 0.036575 `short.run -1` 1.031134 0.406616 `long.run -1` 0.023295 0.959547 `short.run -2` -0.052558 -0.331962 `long.run -2` -0.009059 -0.046906 > > ###Estimate models: TVAR > TVar<-TVAR(zeroyld, lag=2, include="none", gamma=10.653) Best unique threshold 10.653 > all.equal(coef(tsDyn:::toMlm.nlVar(TVar)),t(TVar$coeffmat), check.attributes=FALSE) [1] TRUE > > TVar2<-TVAR(zeroyld, lag=2, include="const", gamma=10.653) Best unique threshold 10.653 > all.equal(coef(tsDyn:::toMlm.nlVar(TVar2)),t(TVar2$coeffmat), check.attributes=FALSE) [1] TRUE > > TVar3<-TVAR(zeroyld, lag=2, include="trend", gamma=10.653) Best unique threshold 10.653 > all.equal(coef(tsDyn:::toMlm.nlVar(TVar3)),t(TVar3$coeffmat), check.attributes=FALSE) [1] TRUE > > TVar4<-TVAR(zeroyld, lag=2, include="both", gamma=9.125) Best unique threshold 9.125 > all.equal(coef(tsDyn:::toMlm.nlVar(TVar4)),t(TVar4$coeffmat), check.attributes=FALSE) [1] TRUE > > > proc.time() user system elapsed 1.84 0.23 2.07