搜索
人大经济论坛 附件下载

附件下载

所在主题:
文件名:  joe_02m.rar
资料下载链接地址: https://bbs.pinggu.org/a-2393953.html
附件大小:
71.42 KB   举报本内容
TAR_CI.R
##To estimate and test a threshold bi-variate VECM
##
##written by:
##
##Bruce E. Hansen
##Department of Economics
##Social Science Building
##University of Wisconsin
##Madison, WI 53706-1393
##behansen@wisc.edu
##http://www.ssc.wisc.edu/~bhansen/
##
##and
##
##Byeongseon Seo
##Department of Economics
##Soongsil University
##Seoul, 156-743
##Korea
##seo@saint.soongsil.ac.kr
##
##
##This R program estimates a bi-variate VECM, a threshold bi-variate VECM, and
##tests for the presence of a threshold.The methods are those described in
##"Testing for Threshold Cointegration" by Bruce E. Hansen and Byeongseon Seo.
##
##The program is set up to replicate the empirical application to the 3-month
##and 6-month interest rates series.For your own application, load your data
##into the matrix "dat", and change the controls listed below
##
###########################################################################

# Controls #

k <- 1 # Lags in VAR beyond EC
gn <- 300 # number of gridpoints for gamma
bn <- 300 # number of gridpoints for beta
trim <- .05 # trimming percentage for threshold
boot <- 5000 # number of bootstrap replications
# set equal to zero to not do testing
coint <- 1 # set to 1 to estimate cointegrating vector
# set to 0 to fix cointegrating vector at _cvalue
cvalue <- 1 # cointegrating vector, if coint=0
cov <- 1 # covariance matrix estimation method
# set to 1 for Eicker-White
# set to 0 for conventional homoskedastic estimator
p_ests <- 1 # set to 1 to print estimates, else 0
graph <- 1 # set to 1 to generate graph of nonlinear ECM, else 0
graph_rotate <- 0 # set to 1 to generate rotated graphs
# (useful for some print jobs, but ackward for screen viewing)

# Load your own data into matrix "dat" #
# Here we load in the 3-month and 6-month T-Bill series #

dat <- read.table("zeroyld.dat")
dat <- dat[1:nrow(dat),(7:62)]
rs <- rbind(as.matrix(seq(0,18,1)),21,24,30,as.matrix(seq(36,(36+7*12),12)))
short <- 12
long <- 120
short_i <- which.max(rs==short)
long_i <- which.max(rs==long)
dat <- dat[,cbind(long_i,short_i)]


来自于Hansen and seo(2002),此程序用来做门槛检验,原程序及数据见附件3,具体的是想知道文中红色字体的程序表示的是什么意思。万分感谢!


    熟悉论坛请点击新手指南
下载说明
1、论坛支持迅雷和网际快车等p2p多线程软件下载,请在上面选择下载通道单击右健下载即可。
2、论坛会定期自动批量更新下载地址,所以请不要浪费时间盗链论坛资源,盗链地址会很快失效。
3、本站为非盈利性质的学术交流网站,鼓励和保护原创作品,拒绝未经版权人许可的上传行为。本站如接到版权人发出的合格侵权通知,将积极的采取必要措施;同时,本站也将在技术手段和能力范围内,履行版权保护的注意义务。
(如有侵权,欢迎举报)
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

GMT+8, 2026-1-10 09:52