[R] tsDyn package (TVAR usage)
francesca.brusa
fra.brusa at hotmail.it
Wed Jul 27 15:12:37 CEST 2011
Hi,
I'm using the tsDyn package to estimate a multivariate threshold VAR.
Currently, I'm in trouble with the selection of an external transition
variable. I cannot select it properly. My xls spreadsheet (rates3) contains
3 variables: I want to use the first and the second one as "data" and the
third one as a threshold (external). Among my attemps:
rm(list=ls())
library(tsDyn)
rates3 <- read.csv(file="usrates_r3.csv", head=TRUE,sep=";")
1)
tvar<- TVAR(rates3[,1:2], lag=7, nthresh=1,
thDelay=1,mTh=0,rates3[,3],trim=0.1,plot=TRUE)
2)
tvar<- TVAR(rates3[,1:2], lag=7,include=c("const"),model=c("TAR"),
commonInter = FALSE, nthresh=1,
thDelay=1,mTh=0,rates3[,3],trim=0.1,plot=TRUE)
By using two different xls (usrates for data, sspread for the threshold)
usrates <- read.csv(file="usrates_r.csv", head=TRUE,sep=";")
sspread <- read.csv(file="sspread.csv", head=TRUE,sep=";")
1)
tvar<- TVAR(usrates, lag=7, nthresh=1,
thDelay=4,mTh=0,sspread,trim=0.1,plot=TRUE)
2)
tvar<- TVAR(usrates, lag=7,include=c("const"),model=c("TAR"), commonInter =
FALSE, nthresh=1, thDelay=1,mTh=0,sspread,trim=0.1,plot=TRUE)
class(tvar)
summary(tvar)
Can someone shed more lights on the "thVar" usage?
Many thanks,
Francesca
--
View this message in context: http://r.789695.n4.nabble.com/tsDyn-package-TVAR-usage-tp3698434p3698434.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list