楼主: smilezhan
9171 7

[回归分析求助] HURDLE MODEL在STATA中的实现 [推广有奖]

  • 0关注
  • 0粉丝

初中生

76%

还不是VIP/贵宾

-

威望
0
论坛币
2 个
通用积分
0.9600
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
116 点
帖子
13
精华
0
在线时间
24 小时
注册时间
2011-11-21
最后登录
2020-3-19

楼主
smilezhan 发表于 2013-8-4 11:39:28 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
from the help desk hurdle models (McDowell) 2003.pdf (179.64 KB) 最近被HURDLE MODEL搞得焦头烂额,在网上找了一些资料。一位STATA公司的研究者写了一篇HURDLE MODEL在STATA中运行的分两步聚和一个步骤完成的命令。

我是STATA初学者,这个文件看完还是不太会在STATA中运行HURDLE MODEL。如果哪位网友参照用了,觉得好,告诉我一声。谢谢。

此文不收币,上传免费分享求反馈。

二维码

扫码加我 拉你入群

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

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

关键词:hurdle model Stata Hurd mode 网上 资料

沙发
夸克之一 发表于 2013-8-4 12:42:48
请@蓝色 及诸位网友帮忙看下。

我不接触这个模型,但根据STATA Journal的文章,应该可以分两步解决。

第一步是用 cloglog这个命令处理y=0的情况。 第二步是用trpois0 处理y>0的情况。

命令很简单就是这些,但背后的“故事”还需要熟悉这个命令和研究方向的朋友们尽力了。。
另外根据热心网友提供的信息,hnblogithttp://ideas.repec.org/c/boc/bocode/s456401.html)这个命令可以一步处理,效果应该就是论文中提到的“一步法”


hnblogit不是stata自带命令,所以请先 ssc install hnblogit安装命令,我只能帮到这里。。
已有 2 人评分经验 论坛币 学术水平 热心指数 信用等级 收起 理由
smilezhan + 1 + 1 + 1 好的意见建议
Sunknownay + 100 + 10 + 1 + 1 + 1 热心帮助其他会员

总评分: 经验 + 100  论坛币 + 10  学术水平 + 2  热心指数 + 2  信用等级 + 2   查看全部评分

藤椅
蓝色 发表于 2013-8-4 14:02:49
microeconometric using stata那本书里有介绍

板凳
smilezhan 发表于 2013-8-7 01:18:08
万分谢谢。正在学习中~~~~~~~

报纸
tfli_2005 发表于 2014-2-13 12:34:42
我也正在做这个模型,也是不知道命令,很着急,楼上的各位大侠可以指教一下吗?是不是我的数据有问题?

地板
youngvitas 学生认证  发表于 2015-4-15 18:47:06
from the help desk hurdle models (McDowell) 2003.pdf (179.64 KB)
[size=0.83em]2013-8-4 11:37:18 上传



HURDLE MODEL本质就是第一步是用 cloglog这个命令处理y=0的情况。 第二步是用trpois0 处理y>0的情况

hnblogit让这过程一起显示出来了而已


h hnblogit

webuse ships, clear

hnblogit accident co_70_74 co_75_79 op_75_79, nolog exposure(service)

hnblogit accident co_70_74 co_75_79 op_75_79, nolog exposure(service) cluster(ship)

7
蓝色 发表于 2015-4-16 07:57:22
如果是stata14,已经有hurdle模型命令了www.stata.com/manuals14/rchurdle.pdf

页面提取自-u.jpg
Title

    [R] churdle -- Cragg hurdle regression


Syntax

    Basic syntax

        churdle linear depvar, select(varlist_s) {ll(...) | ul(...)}

        churdle exponential depvar, select(varlist_s) ll(...)


    Full syntax for churdle linear

        churdle linear depvar [indepvars] [if] [in] [weight], select(varlist_s[, noconstant het(varlist_o)]) {ll(#|varname) | ul(#|varname)} [options]


    Full syntax for churdle exponential

        churdle exponential depvar [indepvars] [if] [in] [weight], select(varlist_s[, noconstant het(varlist_o)]) ll(#|varname) [options]


    options                    Description
    -----------------------------------------------------------------------------------------------------------------------------------------------------
    Model
    * select()                 specify independent variables and options for selection model
    + ll(#|varname)            lower truncation limit
    + ul(#|varname)            upper truncation limit
      noconstant               suppress constant term
      constraints(constraints) apply specified linear constraints
      het(varlist)             specify variables to model the variance

    SE/Robust
      vce(vcetype)             vcetype may be oim, robust, cluster clustvar, bootstrap, or jackknife

    Reporting
      level(#)                 set confidence level; default is level(95)
      nocnsreport              do not display constraints
      display_options          control columns and column formats, row spacing, line width, display of omitted variables and base and empty cells, and
                                 factor-variable labeling

    Maximization
      maximize_options         control the maximization process; seldom used

      coeflegend               display legend instead of statistics
    -----------------------------------------------------------------------------------------------------------------------------------------------------
    * select() is required.  The full specification is
          select(varlist_s[, noconstant het(varlist_o)])
      noconstant specifies that the constant be excluded from the selection model.  het(varlist_o) specifies the variables in the error-variance function
      of the selection model.
    + You must specify at least one of ul(#|varname) or ll(#|varname) for the linear model and must specify ll(#|varname) for the exponential model.
    indepvars, varlist_s, and varlist_o may contain factor variables; see fvvarlist.
    bootstrap, by, fp, jackknife, rolling, statsby, and svy are allowed; see prefix.
    Weights are not allowed with the bootstrap prefix.
    vce() and weights are not allowed with the svy prefix.
    fweights, iweights, and pweights are allowed; see weight.
    coeflegend does not appear in the dialog box.
    See [R] churdle postestimation for features available after estimation.


Menu

    Statistics > Linear models and related > Hurdle regression


Description

    churdle fits a linear or exponential hurdle model for a bounded dependent variable.  The hurdle model combines a selection model that determines the
    boundary points of the dependent variable with an outcome model that determines its nonbounded values.  Separate independent covariates are permitted
    for each model.


Options

        +-------+
    ----+ Model +----------------------------------------------------------------------------------------------------------------------------------------

    select(varlist_s[, noconstant het(varlist_o)]) specifies the variables and options for the selection model.  select() is required.

    ll(#|varname) and ul(#|varname) indicate the lower and upper limits, respectively, for the dependent variable.  You must specify one or both for the
        linear model and must specify a lower limit for the exponential model.  Observations with depvar <= ll() have a lower bound; observations with
        depvar >= ul() have an upper bound; and the remaining observations are in the continuous region.

    noconstant, constraints(constraints); see [R] estimation options.

    het(varlist) specifies the variables in the error-variance function of the outcome model.

        +-----------+
    ----+ SE/Robust +------------------------------------------------------------------------------------------------------------------------------------

    vce(vcetype) specifies the type of standard error reported, which includes types that are derived from asymptotic theory (oim), that are robust to
        some kinds of misspecification (robust), that allow for intragroup correlation (cluster, clustvar), and that use bootstrap or jackknife methods
        (bootstrap, jackknife); see [R] vce_option.

        +-----------+
    ----+ Reporting +------------------------------------------------------------------------------------------------------------------------------------

    level(#), nocnsreport; see [R] estimation options.

    display_options:  noci, nopvalues, noomitted, vsquish, noemptycells, baselevels, allbaselevels, nofvlabel, fvwrap(#), fvwrapon(style), cformat(%fmt),
        pformat(%fmt), sformat(%fmt), and nolstretch; see [R] estimation options.

        +--------------+
    ----+ Maximization +---------------------------------------------------------------------------------------------------------------------------------

    maximize_options:  difficult, technique(algorithm_spec), iterate(#), [no]log, trace, gradient, showstep, hessian, showtolerance, tolerance(#),
        ltolerance(#), nrtolerance(#), nonrtolerance, and from(init_specs); see [R] maximize.  These options are seldom used.

    The following option is available with churdle but is not shown in the dialog box:

    coeflegend; see [R] estimation options.


Examples

    -------------------------------------------------------------------------------------------------------------------------------------------------------
    Setup
        . webuse fitness

    Cragg hurdle linear regression
        . churdle linear hours age i.smoke distance i.single, select(commute whours age) ll(0)

    Average marginal effect of age
        . margins, dydx(age)

    Cragg hurdle linear regression with a model for the variance
        . churdle linear hours age i.smoke distance i.single, select(commute whours age, het(age single)) ll(0)

    Cragg hurdle exponential regression
        . churdle exponential hours age i.smoke distance i.single, select(commute whours age) ll(0) nolog

    Average marginal effect of age
        . margins, dydx(age)

    -------------------------------------------------------------------------------------------------------------------------------------------------------
    Setup
        . webuse nhanes2f, clear
        . svyset psuid [pweight=finalwgt], strata(stratid)

    Cragg hurdle linear regression with survey data
        . svy: churdle linear finalwgt i.female copper, ll(2000) select(highbp agegrp)

    -------------------------------------------------------------------------------------------------------------------------------------------------------


已有 1 人评分论坛币 热心指数 收起 理由
SpencerMeng + 10 + 1 感谢告知~

总评分: 论坛币 + 10  热心指数 + 1   查看全部评分

8
447641423 发表于 2020-7-29 03:18:17
h hnblogit是不是可以得到stata的帮助

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-3 15:32