Stata:面板门槛模型(附双固定效应面板门槛模型) 您所在的位置:网站首页 stata如何删除样本显著 Stata:面板门槛模型(附双固定效应面板门槛模型)

Stata:面板门槛模型(附双固定效应面板门槛模型)

2023-06-29 02:26| 来源: 网络整理| 查看: 265

因此,不存在门槛值的零假设为: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 命令 ,下载地址为: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.

资源下载

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

计量经济分析方法与建模:EViews应用及实例

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.

资源下载

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返回搜狐,查看更多



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有