全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
20195 9
2019-08-12
悬赏 30 个论坛币 已解决
各位大佬,想请教一下,我的数据是短面板,想采用双向固定效应模型,添加了个体层面和时间层面的固定效应,但是有样本选择偏误,需要使用Heckman两步法,请问固定效应模型怎么使用Heckman两步法。
比如 我的被解释变量是y 解释变量 x1 x2 x3 heckman第一步的虚拟变量是z 解释变量x1 x2 x4
想请问stata语句应该怎样写
因为是双向固定效应 xtreg y x1 x2 x3 year1-year8, fe r这个应该怎么放入Heckman当中

还有一个小问题,我只知道Heckman的一步完成语句
heckman y x1 x2 x3, select(z=x1 x2 x4) twostep
请问如果要分开写语句 先写probity 应该怎么分开写呢 谢谢大家

最佳答案

蓝色 查看完整内容

是随机效应模型 既然官方都没有固定效应,肯定是有一些原因无法实现,所以那你自己就不用做固定效应的。 https://bbs.pinggu.org/thread-7216458-1-1.html [XT] xtheckman -- Random-effects regression with sample selection (View complete PDF manual entry) Syntax xtheckman depvar , select(depvar_s = varlist_s [, sel_options]) [options] options ...
二维码

扫码加我 拉你入群

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

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

全部回复
2019-8-12 10:19:02
是随机效应模型
既然官方都没有固定效应,肯定是有一些原因无法实现,所以那你自己就不用做固定效应的。

https://bbs.pinggu.org/thread-7216458-1-1.html


[XT] xtheckman -- Random-effects regression with sample selection
                  (View complete PDF manual entry)


Syntax

        xtheckman depvar [indepvars] [if] [in], select(depvar_s = varlist_s [, sel_options]) [options]

    options                 Description
    -------------------------------------------------------------------------------------------------------------
    Model
    * select()              specify selection equation: dependent and independent variables; whether to have
                              constant term and offset variable or include random effect
      noconstant            suppress constant term
      norecorrelation       constrain the random effects to be independent
      offset(varname_o)     include varname_o in model with coefficient constrained to 1
      constraints(numlist)  apply specified linear constraints

    SE/Robust
      vce(vcetype)          vcetype may be oim, robust, cluster clustvar, opg, 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

    Integration
      intmethod(intmethod)  integration method for random effects; intmethod may be mvaghermite (the default) or
                              ghermite
      intpoints(#)          set the number of integration (quadrature) points for random-effects integration;
                              default is intpoints(7)

    Maximization
      maximize_options      control the maximization process; seldom used

      collinear             keep collinear variables
      coeflegend            display legend instead of statistics
    -------------------------------------------------------------------------------------------------------------

    sel_options             Description
    -------------------------------------------------------------------------------------------------------------
    Model
      noconstant            suppress constant term
      nore                  do not include random effects in selection model
      offset(varname_o)     include varname_o in model with coefficient constrained to 1
    -------------------------------------------------------------------------------------------------------------

    * select() is required.
    indepvars and varlist_s may contain factor variables; see fvvarlists.
    depvar, indepvars, depvar_s, and varlist_s may contain time-series operators; see tsvarlist.
    bootstrap, by, jackknife, and statsby are allowed.  See prefix.
    collinear and coeflegend do not appear in the dialog box.
    See [XT] xtheckman postestimation for features available after estimation.


Menu

    Statistics > Longitudinal/panel data > Sample-selection models > Linear regression with sample selection (RE)


Description

    xtheckman fits a random-effects linear regression model with endogenous sample selection.

二维码

扫码加我 拉你入群

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

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

2019-8-12 10:30:08
stata16有xtheckman命令
你可以在论坛上下载stata16,看看
另外,如果自己手动计算,标准誤很难自己算,教科书上不让自己去算
二维码

扫码加我 拉你入群

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

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

2019-8-12 10:35:17
蓝色 发表于 2019-8-12 10:30
stata16有xtheckman命令
你可以在论坛上下载stata16,看看
另外,如果自己手动计算,标准誤很难自己算,教 ...
谢谢,请问xtheckman就是固定效应模型的Heckman两步法的语句吗?能请问一下具体的语句吗?实在是找不到,谢谢。
二维码

扫码加我 拉你入群

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

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

2019-8-12 16:18:58
蓝色 发表于 2019-8-12 14:42
是随机效应模型
既然官方都没有固定效应,肯定是有一些原因无法实现,所以那你自己就不用做固定效应的。
...
感谢感谢
二维码

扫码加我 拉你入群

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

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

2019-8-13 21:14:58
请问楼主问题解决了吗?
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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