楼主: aizhan12
3164 6

[回归分析求助] ivreghdfe工具变量回归 [推广有奖]

  • 0关注
  • 0粉丝

已卖:23份资源

高中生

80%

还不是VIP/贵宾

-

威望
0
论坛币
1098 个
通用积分
6.5758
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
491 点
帖子
16
精华
0
在线时间
34 小时
注册时间
2023-5-15
最后登录
2024-1-18

楼主
aizhan12 发表于 2023-7-6 20:24:53 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
请教一下各位大神,为什么用ivreghdfe做工具变量回归,总是报错“option requirements not allowed”,问题出在哪呀?

我的命令 ivreghdfe lntce pro fdi wage er ers (lnrot=lnrot_us),absorb(year Indu) cluster(Indu)
二维码

扫码加我 拉你入群

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

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

关键词:IVREG 工具变量 IVR GHD REG

沙发
蓝色 发表于 2023-7-7 21:21:01
重新安装命令吧
测试没有问题

  1. . clear

  2. . webuse nlswork
  3. (National Longitudinal Survey of Young Women, 14-24 years old in 1968)

  4. . ivreghdfe ln_w grade age (ttl_exp= union ) tenure, absorb(year idcode) cluster(idcode)
  5. (dropped 671 singleton observations)
  6. note: variable #3 is probably collinear with the fixed effects (all partialled-out values are cl
  7. > ose to zero; tol = 1.0e-09)
  8. (MWFE estimator converged in 8 iterations)

  9. IV (2SLS) estimation
  10. --------------------

  11. Estimates efficient for homoskedasticity only
  12. Statistics robust to heteroskedasticity and clustering on idcode

  13. Number of clusters (idcode) =     3461                Number of obs =    18337
  14.                                                       F(  3,  3460) =     0.11
  15.                                                       Prob > F      =   0.9526
  16. Total (centered) SS     =   1021.07999                Centered R2   = -5.4e+02
  17. Total (uncentered) SS   =   1021.07999                Uncentered R2 = -5.4e+02
  18. Residual SS             =  552368.8633                Root MSE      =    5.491

  19. ------------------------------------------------------------------------------
  20.              |               Robust
  21.      ln_wage | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
  22. -------------+----------------------------------------------------------------
  23.      ttl_exp |   5.446304   12.99846     0.42   0.675    -20.03913    30.93174
  24.        grade |          0  (omitted)
  25.          age |  -.0650074   .3721608    -0.17   0.861    -.7946843    .6646696
  26.       tenure |  -1.305851   3.158822    -0.41   0.679    -7.499196    4.887493
  27. ------------------------------------------------------------------------------
  28. Underidentification test (Kleibergen-Paap rk LM statistic):              0.173
  29.                                                    Chi-sq(1) P-val =    0.6777
  30. ------------------------------------------------------------------------------
  31. Weak identification test (Cragg-Donald Wald F statistic):                0.441
  32.                          (Kleibergen-Paap rk Wald F statistic):          0.173
  33. Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
  34.                                          15% maximal IV size              8.96
  35.                                          20% maximal IV size              6.66
  36.                                          25% maximal IV size              5.53
  37. Source: Stock-Yogo (2005).  Reproduced by permission.
  38. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
  39. ------------------------------------------------------------------------------
  40. Warning: estimated covariance matrix of moment conditions not of full rank.
  41.          overidentification statistic not reported, and standard errors and
  42.          model tests should be interpreted with caution.
  43. Possible causes:
  44.          number of clusters insufficient to calculate robust covariance matrix
  45.          singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
  46. partial option may address problem.
  47. ------------------------------------------------------------------------------
  48. Collinearities detected among instruments: 1 instrument(s) dropped
  49. Instrumented:         ttl_exp
  50. Included instruments: grade age tenure
  51. Excluded instruments: union
  52. Partialled-out:       _cons
  53.                       nb: total SS, model F and R2s are after partialling-out;
  54.                           any small-sample adjustments include partialled-out
  55.                           variables in regressor count K
  56. ------------------------------------------------------------------------------

  57. Absorbed degrees of freedom:
  58. -----------------------------------------------------+
  59. Absorbed FE | Categories  - Redundant  = Num. Coefs |
  60. -------------+---------------------------------------|
  61.         year |        12           0          12     |
  62.       idcode |      3461        3461           0    *|
  63. -----------------------------------------------------+
  64. * = FE nested within cluster; treated as redundant for DoF computation
复制代码

藤椅
317792209 在职认证  学生认证  发表于 2023-7-8 08:48:28
用这个试试
  1. ivreghdfe lntce pro fdi wage er ers (lnrot=lnrot_us),absorb(year Indu) cluster(Indu year)
复制代码

板凳
Alicization666 学生认证  发表于 2023-7-8 17:00:36
不清楚,没做过

报纸
aizhan12 发表于 2023-7-8 19:21:45
蓝色 发表于 2023-7-7 21:21
重新安装命令吧
测试没有问题
我是直接ssc install ivreghdfe安装的命令,也会有问题吗?

地板
蓝色 发表于 2023-7-9 14:10:30
aizhan12 发表于 2023-7-8 19:21
我是直接ssc install ivreghdfe安装的命令,也会有问题吗?
我测试命令格式没有问题
可能就是命令的问题

7
chenjunxian5380 发表于 2023-12-6 17:58:37
aizhan12 发表于 2023-7-8 19:21
我是直接ssc install ivreghdfe安装的命令,也会有问题吗?
想问问你最后解决了吗?

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

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