全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
13183 22
2019-07-24
悬赏 15 个论坛币 未解决
请问大家,

使用中山大学连玉君教授的Xtthres命令进行门槛回归模型操作,命令中有minobs(#),不同观测数量设置带来的结果存在不一致,如何确定最小观测数量呢?如果去掉minobs(#)项,是否默认全部观测值呢?谢谢!当然,大家也可以一起讨论xthreg与xtthres的区别,以及这两个命令如何使用等问题。


二维码

扫码加我 拉你入群

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

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

全部回复
2019-7-24 15:39:50
如果有想获取xtthres命令和具体安装步骤的坛友,也可以在下方留言讨论交流
二维码

扫码加我 拉你入群

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

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

2019-7-26 21:17:56
这是连玉君老师的xtthres命令
Estimate Panel Threshold Model



Syntax

        xtthres varlist [if] [in] , thres(varname) dthres(varname) [ qn(#) bs1(#) bs2(#) bs3(#) levle(#) minobs(#) ]

    xtthres is for use with panel data.  You must tsset your data before using xtthres; see help tsset xt.

    xtthres shares the features of all estimation commands; see help estcom.


Description

    xtthres fits static panel threshold model with fixed effects, which is first developed by B.E.,Hansen (1999).
    After estimating the model using xtthres, you can use xttr_graph to draw graphs for each model so as to see the construction of confidence intervials
    of r_hat.


Options

    thres(varname) specifies threshold variable, as denoted by q_it in Hansen(1999).  Note that this option should not be omitted.

    dthres(varname) specifies the variable that will show threshold effects, as denoted by x_it in Hansen(1999). This variable will be multipled by the
        indicator function I(.).  Note that this option should not be omitted either.

    qn(#) specifies the number of distinct values to be search in finding out the optimal estimate of threshold effects, r_hat, which will minimize the
        sum of square residuals of the model.  The default value is 400.

    bs1(#), bs2(#), bs3(#) specify the Bootstrap times in single threshold, double threshold and triple threshold model respectively. The default values
        are all 300.

    level(#) specifies the confidence level, in percent, for confidence intervals.  The default is level(95) or as set by set level; see help level.

    minobs specifies the minimum number of observations in each of the regimes when searching for r_hats.  The default is 10.


Examples

    . 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)

二维码

扫码加我 拉你入群

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

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

2019-7-26 21:22:10
这是王群勇老师的xthreg命令:

Title

    xthreg -- Estimate fixed-effect panel threshold model


Syntax

        xthreg depvar [indepvars] [if] [in], rx(varlist) qx(varname) [thnum(#) grid(#) trim(numlist) bs(numlist) thlevel(#) gen(newvarname) noreg nobslog
           thgiven options]

    where depvar is the dependent variable and indepvars are the regime-independent variables.


Description

    xthreg fits fixed-effect panel threshold models based on the method proposed by Hansen (1999).  xthreg uses [XT] xtreg to fit the fixed-effect panel
    threshold model given the threshold estimator.  The fixed-effect panel threshold model requires balanced panel data, which is checked automatically
    by xthreg.  The estimation and test of the threshold effect are computed in Mata.


Options

    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.

    thlevel(#) specifies the confidence level, as a percentage, for confidence intervals of the threshold.  The default is 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.

    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().


Examples

    Setup
        . 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) bs(0 300 300) thgiven
        . 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)

    Estimate a triple-threshold model directly
        . xthreg i q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(3) trim(0.01 0.01 0.05) bs(300 300 300)

    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)

二维码

扫码加我 拉你入群

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

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

2019-7-26 21:29:26
基于个人理解,本人认为xtthres 和xthreg命令的区别:xthreg是基于固定效应的门槛模型,而xtthres是基于OLS或者随机效应的门槛模型(本人判断,具体还需要请教连老师)。因此,在估计中,xthreg将会把非时变变量omitted,而xtthres则可以对所有变量进行分析。有理解不到位或者错误的地方,还望指正,谢谢!
二维码

扫码加我 拉你入群

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

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

2019-7-26 21:33:24
板凳 沙发我都坐了,千万不要沉,大家讨论下
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群