楼主: 栀子和橙子
11595 22

[回归分析求助] 关于门槛模型的若干问题 [推广有奖]

  • 0关注
  • 0粉丝

博士生

78%

还不是VIP/贵宾

-

威望
0
论坛币
148 个
通用积分
76.9895
学术水平
12 点
热心指数
12 点
信用等级
11 点
经验
948 点
帖子
54
精华
0
在线时间
645 小时
注册时间
2017-8-3
最后登录
2023-1-30

15论坛币
请问大家,

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


关键词:nobs 回归模型 中山大学 门槛回归 obs
沙发
栀子和橙子 发表于 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 |只看作者 |坛友微信交流群
板凳 沙发我都坐了,千万不要沉,大家讨论下

使用道具

7
栀子和橙子 发表于 2019-7-26 22:01:37 |只看作者 |坛友微信交流群
https://bbs.pinggu.org/thread-4771282-1-1.html

使用道具

8
臻知之 发表于 2019-7-26 22:17:15 |只看作者 |坛友微信交流群
楼主解决了吗?我做这个

使用道具

9
糖汤唐堂趟 发表于 2019-7-30 09:16:57 |只看作者 |坛友微信交流群
楼主,请假一个问题,门槛回归模型的门槛值能设定为被解释变量吗?

使用道具

10
糖汤唐堂趟 发表于 2019-7-30 09:21:28 |只看作者 |坛友微信交流群
xtthres命令 估计用的固定效应模型,“xthreg”用于估计面板固定效应门槛回归模型,该命令根据Hansen(1999)论文提出的方法拟合模型。楼主我看连老师视频课记录的杂都是固定效应模型呢?是我记录错了吗?

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-28 17:48