来源 | 数量经济学综合整理
转载请联络
停止回回阐发,一般需要研究系数的估量值能否不变。良多经济变量都存在构造突变问题,利用通俗回回的做法就是确定构造突变点,停止分段回回。那就像我们高中进修的分段函数。但是关于大样本、面板数据若何觅觅构造突变点。所以本文在此讲解面板门限回回的问题,门限回回也适用于时间序列(文章后面将介绍stata15.0新号令停止时间序列的门限回回)。
门限效应,是指当一个经济参数到达特定的数值后,引起别的一个经济参数发作突然转向其它开展形式的现象(构造突变)。做为原因现象的临界值称为门限值。例如,功效和时间存在非线性关系,但是在每个阶段是线性关系。有些人将如许的模子称为门槛模子,或者门限模子。假设模子的研究对象包罗多个个别多个年度,那么就是门限面板模子。
一、historyHansen
常见模子如下:门槛回回模子(threshold regression,也称门限回回):
汉森(Bruce E. Hansen)在门限回回模子上做出了良多奉献。Hansen于1996年在《Econometrica》上颁发文章《Inference when a nuisance parameter is not identified under the null hypothesis》,提出了时间序列门限自回回模子(TAR)的估量和查验。之后,他在门限模子上持续逃踪,颁发了几篇典范文章,出格是1999年的《Threshold effects in non-dynamic panels: Estimation, testing and inference》(Hansen (1999) 初次介绍了具有个别效应的面板门限模子的计量阐发办法, 该办法以残差平方和最小化为前提确定门限值, 并查验门限值的显著性, 征服了主看设定构造突变点的偏误。详细构想是:选定某一变量做为门限变量, 根据搜觅到的门限值将回回模子区分为多个区间, 每个区间的回回方程表达差别, 根据门限划分的区间将其他样本值停止回类, 回回后比力差别区间系数的改变。),2000年的《Sample splitting and threshold estimation》和2004年与别人协做的《Instrumental Variable Estimation of a Threshold Model》。
展开全文
在那些文章中,Hansen介绍了包罗个别固定效应的静态平衡面板数据门限回回模子,论述了计量阐发办法。办法方面,起首要通过减往时间均值方程,消弭个别固定效应,然后再操纵OLS(最小二乘法)停止系数估量。假设样本数量有限,那么能够利用自举法(Bootstrap)反复抽取样本,进步门限效应的显著性查验效率。在Hansen(1999)的模子中,阐明变量中不克不及包罗内生阐明变量,无法扩展利用范畴。Caner和Hansen在2004年处理了那个问题。他们研究了带有内生变量和一个外生门限变量的面板门限模子。与静态面板数据门限回回模子有所差别,在含有内生阐明变量的面板数据门限回回模子中,需要操纵简化型对内生变量停止必然的处置,然后用2SLS(两阶段最小二乘法)或者GMM(广义矩估量)对参数停止估量。
二.显著性查验
门槛回回模子显著性查验的目标是,查验以门檻值划分的两组样本其模子估量参数能否显著差别。
因而,不存在门槛值的零假设为:Ho:两个系数不异。同时构造LM统计量:
此中,So是在零假设下的残差平方和。因为LM统计量其实不从命原则的散布。因而, Hansen(2000)提出了通过“自举法”( Bootstrap)来获得渐进散布的设法,进而得出响应的概率p值,也称为 Bootstrap P值。
那种办法的根本思惟是:在阐明变量和门槛值给定的前提下,模仿( Simulate)产生一组因变量序列,并使其称心N(0,e2),此中e是式(4)的残差项。每得到一个自抽样样本,就能够计算出一个模仿的エM统计量。将那一过程反复1000次。Hansen(1996)认为模仿产生的LM统计量大于式(6)的次数占总模仿次数的百分比就是“自举法”估量得到的P值。那里的Bootstrap P值类似于通俗计量办法得出的相伴概率P值。例如,当 Bootstrap P值小于0.01时,表达在1 %的显著性程度下通过了LM查验,以此类推。
三.置信区间
以上的查验过程为只要一个门槛值的查验过程,为了能确定能否存在两个门槛值或者是更多的门槛值,我们应当查验能否存在两个门槛值,回绝意味着至少存在一个门槛值。我们能够假设己经估量的第一个门槛值,然后起头觅觅第二个门槛值。在确定有两个门槛值后,再觅觅第三个门槛值,办法都和前面的一样,曲至我们不克不及回绝零假设。
四、门槛回回:xthreg
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,也就是至少存在三个门槛值。
rx(varlist) is the regime-dependent variable. Time-series operators are allowed. rx is required. 区造变量或者轨制变量
qx(varname) is the threshold variable. Time-series operators are allowed. qx is required. 门限变量或者门槛变量
thnum(#) is the number of thresholds. In the current version (Stata 13), # must be equal to or less than 3. The default is thnum(1). 门槛个数
grid(#) is the number of grid points. grid is used to avoid consuming too much time when computing large samples. The default is grid(300). 网格点数
trim(numlist) is the trimming proportion to estimate each threshold. The number of trimming proportions must be equal to the number of thresholds specified in thnum. The default is trim(0.01) for all thresholds. For example, to fit a triple-threshold model, you may set trim(0.01 0.01 0.05).
bs(numlist) is the number of bootstrap replications. If bs is not set, xthreg does not use bootstrap for the threshold-effect test. bootstrap迭代次数
thlevel(#) specifies the confidence level, as a percentage, for confidence intervals of the threshold. The default is thlevel(95). 置信区间,默认为95%,即thlevel(95)
gen(newvarname) generates a new categorical variable with 0, 1, 2, ... for each regime. The default is gen(_cat).
noreg suppresses the display of the regression result. 不展现回回成果
nobslog suppresses the iteration process of the bootstrap. 不展现bootstrap迭代过程
thgiven fits the model based on previous results. options are any options available for [XT] xtreg.
Time-series operators are allowed in depvar, indepvars, rx, and qx.
depvar被阐明变量,indepvars 阐明变量,qx(varname) is the threshold variable,门限变量,thnum(#) is the number of thresholds,在stata13.0中门槛值是需要项目,需要等于大于1,小于等于3,默认值为1,也就是至少存在三个门槛值。
rx(varlist) is the regime-dependent variable. Time-series operators are allowed. rx is required. 区造变量或者轨制变量
qx(varname) is the threshold variable. Time-series operators are allowed. qx is required. 门限变量或者门槛变量
thnum(#) is the number of thresholds. In the current version (Stata 13), # must be equal to or less than 3. The default is thnum(1). 门槛个数
grid(#) is the number of grid points. grid is used to avoid consuming too much time when computing large samples. The default is grid(300). 网格点数
trim(numlist) is the trimming proportion to estimate each threshold. The number of trimming proportions must be equal to the number of thresholds specified in thnum. The default is trim(0.01) for all thresholds. For example, to fit a triple-threshold model, you may set trim(0.01 0.01 0.05).
bs(numlist) is the number of bootstrap replications. If bs is not set, xthreg does not use bootstrap for the threshold-effect test. bootstrap迭代次数
thlevel(#) specifies the confidence level, as a percentage, for confidence intervals of the threshold. The default is thlevel(95). 置信区间,默认为95%,即thlevel(95)
gen(newvarname) generates a new categorical variable with 0, 1, 2, ... for each regime. The default is gen(_cat).
noreg suppresses the display of the regression result. 不展现回回成果
nobslog suppresses the iteration process of the bootstrap. 不展现bootstrap迭代过程
thgiven fits the model based on previous results. options are any options available for [XT] xtreg.
Time-series operators are allowed in depvar, indepvars, rx, and qx.
五、门槛回回的案例
导进数据
use hansen1999
1、停止单一门槛回回
xthreg i q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(1) trim(0.01) grid(400) bs(300)
输出成果包罗四个部门。第一部门输出门限估量值和自举法的成果。第二部门列表输出门限值及置信区间,Th-1代表单一门限估量值,Th-21 和Th-22代表双门限回回的两个估量值,有时Th-21和Th-1不异。第三部门列出了门限查验,包罗RSS、MSE、F统计量及概率值,以及10%、5%、1%的置信程度。第四部门是固定效应回回成果。
2、停止单门槛双向固定效应模子
xi : xthreg i q1 q2 q3 d1 qd1 i.year, rx(c1) qx(d1) thnum(1) trim(0.01) grid(400) bs(300)
成果为:
3、停止三重门槛回回
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)
4、绘图
输进号令
Plot the confidence interval using likelihood-ratio (LR) statistics
_matplot e(LR21), columns(1 2) yline(7.35, lpattern(dash)) ///
connect(direct) msize(small) mlabp(0) mlabs(zero) ///
ytitle( "LR Statistics") xtitle( "First Threshold") ///
recast(line) name(LR21) nodraw
_matplot e(LR22), columns(1 2) yline(7.35, lpattern(dash)) ///
connect(direct) msize(small) mlabp(0) mlabs(zero) ///
ytitle( "LR Statistics") xtitle( "Second Threshold") ///
recast(line) name(LR22) nodraw
graph combine LR21 LR22, cols(1)
成果为:
六、参考文献及资本下载
计量经济阐发办法与建模:EViews利用及实例
Hansen, Bruce E., 2000. "Sample Splitting and Threshold Estimation," Econometrica, 68, 575-603.(门槛回回Bruce Hansen 在其小我网页所供给的非官方 Stata 号令 ,下载地址为:)
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.
资本下载
Bruce E. Hansen "Sample splitting and threshold estimation" Econometrica (2000)中关于R、Stata、Gauss 、Matlab等软件的Programs and Data下载地址为:
计量经济阐发办法与建模:EViews利用及实例
Hansen, Bruce E., 2000. "Sample Splitting and Threshold Estimation," Econometrica, 68, 575-603.(门槛回回Bruce Hansen 在其小我网页所供给的非官方 Stata 号令 ,下载地址为:)
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.
资本下载
Bruce E. Hansen "Sample splitting and threshold estimation" Econometrica (2000)中关于R、Stata、Gauss 、Matlab等软件的Programs and Data下载地址为: