在这些文章中,Hansen介绍了包含个体固定效应的静态平衡面板数据门限回归模型,阐述了计量分析方法。方法方面,首先要通过减去时间均值方程,消除个体固定效应,然后再利用OLS(最小二乘法)进行系数估计。如果样本数量有限,那么可以使用自举法(Bootstrap)重复抽取样本,提高门限效应的显著性检验效率。 在Hansen(1999)的模型中,解释变量中不能包含内生解释变量,无法扩展应用领域。Caner和Hansen在2004年解决了这个问题。他们研究了带有内生变量和一个外生门限变量的面板门限模型。与静态面板数据门限回归模型有所不同,在含有内生解释变量的面板数据门限回归模型中,需要利用简化型对内生变量进行一定的处理,然后用2SLS(两阶段最小二乘法)或者GMM(广义矩估计)对参数进行估计。
接下来本文为大家介绍stata15.0进行门限回归新命令threshold以及王群勇老师编写的xthreg、xtptm和连玉君老师编写的命令。
二、Stata 15门槛回归:threshold
阈值将一个状态从另一个状态描述出来。有一个效应(一组系数)达到阈值和另一个效应(另一组系数)。Stata的新门限命令适用于时间序列。门槛模型常用于时间序列数据。门槛可以是一个时间。例如,如果你认为投资策略在某个未知的日期发生了变化,你可以用一个模型来获得日期的估计,并在它前后得到不同系数的估计。或者门槛值可以用另一个变量来表示。例如,在一定程度的通货膨胀之外,央行会提高利率。你可以用一个模型来得到门槛值的估计值和两边的系数。
在Stata 15中,进行门槛回归的命令为threshold,语法格式为:threshold depvar [indepvars] [if] [in], threshvar(varname) [options]
其中,其中,depvar为被解释变量,indepvars为相关变量(解释变量)。必选项 threshvar(varname) 表示变量 varname为门槛变量,选项nthresholds(#)指的是number of thresholds,这个命令默认只有一个门槛值(default is nthresholds(1))。也可以通过选择项 nthresholds(#) 来指定多个门槛值,比如 nthresholds(2) 表示有 2 个门槛值,not allowed with optthresh()。
optthresh(#[, ictype]), select optimal number of thresholds less than or equal to #; not allowed with nthresholds(),计算最优的门槛个数,一般有Bayesian information criterion (BIC)、Akaike information criterion (AIC) 、Hannan-Quinn information criterion (HQIC)三个信息准则。其中默认使用BIC信息准则进行选择。
菜单操作步骤为:Statistics > Time series > Threshold regression model
门槛回归Example
调用数据:
webuse usmacro
下面进行门限回归
threshold fedfunds, regionvars(l.fedfunds inflation ogap) threshvar(l2.ogap)
threshold fedfunds, regionvars(l.fedfunds inflation ogap) threshvar(l2.ogap) optthresh(5)
▲图:结果输出
三、王群勇老师xthreg与xtptm命令
xthreg需要stata13及以上版本
语法格式为:
xthreg depvar [indepvars] [if] [in], rx(varlist) qx(varname) [thnum(#) grid(#) trim(numlist) bs(numlist) thlevel(#) gen(newvarname) noreg nobslog thgiven options]
depvar被解释变量,indepvars 解释变量,qx(varname) is the threshold variable,门限变量,thnum(#) is the number of thresholds,在stata13.0中门槛值是必要项目,需要等于大于1,小于等于3,默认值为1,也就是至少存在三个门槛值。
门槛回归的案例
use hansen1999
Estimate a single-threshold model
xthreg i q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(1) trim(0.01) grid(400) bs(300)
Estimate a triple-threshold model given the estimated result above
xthreg i q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(3) trim(0.01 0.01 0.05) grid(400) bs(300 300 300)
输出结果包括四个部分。第一部分输出门限估计值和自举法的结果。第二部分列表输出门限值及置信区间,Th-1代表单一门限估计值,Th-21 和Th-22代表双门限回归的两个估计值,有时Th-21和Th-1相同。第三部分列出了门限检验,包括RSS、MSE、F统计量及概率值,以及10%、5%、1%的置信水平。第四部分是固定效应回归结果。
王群勇老师xtptm命令在此不做介绍,有兴趣可以尝试。
四、连玉君老师xtthres命令
语法格式为:xtthres varlist [if] [in] , thres(varname) dthres(varname) [ qn(#) bs1(#) bs2(#) bs3(#) levle(#) minobs(#) ]
xtthres tobin size tang prof, th(grow) d(tl)
xtthres tobin size tang prof, th(grow) d(tl) bs2(200) bs3(100) minobs(30)
xtthres tobin size tang prof if year<=2001, th(grow) d(tl) qn(200)
五、参考文献及资源下载
Hansen, Bruce E., 2000. "Sample Splitting and Threshold Estimation," Econometrica, 68, 575-603.(门槛回归Bruce Hansen 在其个人网页所提供的非官方 Stata 命令 ,下载地址为: http://www.ssc.wisc.edu/~bhansen/progs/progs_threshold.html)
Hansen, B. E. 1999. Threshold effects in non-dynamic panels: Estimation, testing,and inference. Journal of Econometrics 93: 345-368.
Wang, Qunyong, 2015. "Fixed-effect Panel Threshold Model Using Stata," The Stata Journal, 15(1), 121-134.
连玉君,程建. 不同成长机会下资本结构与经营绩效之关系研究. 当代经济科学,2006(2):97-103.
资源下载
Bruce E. Hansen "Sample splitting and threshold estimation" Econometrica (2000)中关于R、Stata、Gauss 、Matlab等软件的Programs and Data下载地址为:https://www.ssc.wisc.edu/~bhansen/progs/ecnmt_00.html
由于作者计量经济学理论功底以及操作实践的局限性,文中难免有错误,请读者批评指正,更多关于门限回归的资源以及意见,欢迎留言交流。返回搜狐,查看更多