楼主: nk0987
31989 30

[回归分析求助] ivreghdfe得出两步回归结果方法 [推广有奖]

  • 3关注
  • 13粉丝

讲师

46%

还不是VIP/贵宾

-

威望
0
论坛币
33157 个
通用积分
175.0587
学术水平
5 点
热心指数
5 点
信用等级
5 点
经验
650 点
帖子
297
精华
0
在线时间
662 小时
注册时间
2020-12-24
最后登录
2024-5-10

楼主
nk0987 在职认证  学生认证  发表于 2021-6-1 21:41:20 |只看作者 |坛友微信交流群|倒序 |AI写论文
相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
很多人用ivreghdfe回归却不会得出两步回归结果,本人经过探索,发现了其中的办法。大家可以试试看看。可以outreg2得出第一步和第二步结果。
二维码

扫码加我 拉你入群

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

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

关键词:IVREG 回归结果 IVR GHD REG

ivreghdfe.do

657 Bytes

需要: 270 个论坛币  [购买]

ivreghdfe得出两步回归结果

已有 1 人评分学术水平 热心指数 信用等级 收起 理由
日新少年 + 2 + 2 + 2 精彩帖子

总评分: 学术水平 + 2  热心指数 + 2  信用等级 + 2   查看全部评分

本帖被以下文库推荐

沙发
Lee_iris 在职认证  学生认证  发表于 2022-5-19 19:18:49 |只看作者 |坛友微信交流群
1.没有案例数据可以执行,所以不知道是不是数据的问题还是命令下载不全的问题, 楼主给的命令不能很好执行
2.和ivregress2的案例命令非常像,差别在于①把控制变量放在(内生变量=iv)后面,②ivreghdfe命令前加了eststo: ,但是执行错误(option absorb() not allowed),不知道什么原因,③加了两个option:savefirst savefp(f),④这条命令之后的est restore f+解释变量  

要是能解释一下以上这几点变动的原因就好了。也不知道为什么出错。

使用道具

藤椅
Lee_iris 在职认证  学生认证  发表于 2022-5-19 19:53:49 |只看作者 |坛友微信交流群
参考https://github.com/sergiocorreia/reghdfe/#citation安装好最新的命令,最新的reghdfe 6.x不能通过 SSC安装

To find out which version you have installed, type reghdfe, version.

reghdfe 6.x is not yet in SSC. To quickly install it and all its dependencies, copy/paste these lines and run them:

* Install ftools (remove program if it existed previously)
cap ado uninstall ftools
net install ftools, from("https://raw.githubusercontent.com/sergiocorreia/ftools/master/src/")

* Install reghdfe 6.x
cap ado uninstall reghdfe
net install reghdfe, from("https://raw.githubusercontent.com/sergiocorreia/reghdfe/master/src/")
To run IV/GMM regressions with ivreghdfe, also run these lines:

cap ado uninstall ivreg2hdfe
cap ado uninstall ivreghdfe
cap ssc install ivreg2 // Install ivreg2, the core package
net install ivreghdfe, from(https://raw.githubusercontent.co ... eghdfe/master/src/)
Alternatively, you can install the stable/older version from SSC (5.x):

cap ado uninstall reghdfe
ssc install reghdfe

使用道具

板凳
nk0987 在职认证  学生认证  发表于 2022-5-19 20:23:03 |只看作者 |坛友微信交流群
Lee_iris 发表于 2022-5-19 19:18
1.没有案例数据可以执行,所以不知道是不是数据的问题还是命令下载不全的问题, 楼主给的命令不能很好执行 ...
f+你的核心解释变量

使用道具

报纸
Lee_iris 在职认证  学生认证  发表于 2022-5-19 21:23:33 |只看作者 |坛友微信交流群
①把控制变量放在(内生变量=iv)后面和放前面貌似没有什么差异
②ivreghdfe命令前加了eststo: ,但是执行错误(option absorb() not allowed),可以通过先执行ivreghdfe再执行eststo得到同等效果
③关于option:savefirst savefp(f)的解释
The savefirst option requests that the individual first-stage regressions be saved for later access using the estimates command.  If saved, they can also be displayed using first or ffirst and the ivreg2 replay syntax.  The regressions are saved with the prefix "_ivreg2_", unless the user specifies an alternative prefix with the savefprefix(prefix) option.  The savesfirst and savesfprefix(prefix) options work similarly for the sfirst option if the user wishes to save the first-stage and reduced form estimations as a single estimated system.
savesfprefix(prefix)设置了结果的前缀。
④添加option:cluster(city)时,出现报错insufficient observations,可能和数据中个体或者变量比较多有关,不是很清楚,但不聚类的话可以计算出来。


这是对楼主命令的一些反馈,供参考。

使用道具

地板
Lee_iris 在职认证  学生认证  发表于 2022-5-19 21:25:39 |只看作者 |坛友微信交流群
nk0987 发表于 2022-5-19 20:23
f+你的核心解释变量
我还想问下怎么报告F值和KP值

使用道具

7
nk0987 在职认证  学生认证  发表于 2022-5-19 22:27:14 |只看作者 |坛友微信交流群
Lee_iris 发表于 2022-5-19 21:25
我还想问下怎么报告F值和KP值
自己看

使用道具

8
贾多多 学生认证  发表于 2022-5-28 13:12:12 |只看作者 |坛友微信交流群
Lee_iris 发表于 2022-5-19 19:53
参考https://github.com/sergiocorreia/reghdfe/#citation安装好最新的命令,最新的reghdfe 6.x不能通过 S ...
请问,这个最新的reghdfe怎么安装呢,这个网站直接点点不开,有没有什么stata对应的安装命令呢

使用道具

9
贾多多 学生认证  发表于 2022-5-28 13:15:51 |只看作者 |坛友微信交流群
nk0987 发表于 2022-5-19 20:23
f+你的核心解释变量
请问,你的附件里有没有解决option requirements not allowed这个问题呢

使用道具

10
Lee_iris 在职认证  学生认证  发表于 2022-5-28 15:23:25 |只看作者 |坛友微信交流群
nk0987 发表于 2022-5-19 22:27
自己看
是可以看到,只是想通过outreg2等方式直接导出,尝试了网上一些命令和help里的示例没成功。
要尝试的结果太多了,每个的运行时间也很长,一个一个看翻页都翻不上去,得看log,很费时间的。
想要在运行ivreghdfe后直接导出第一二阶段结果,还有对应的F和KP值。有什么其他意见欢迎交流

使用道具

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

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

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

GMT+8, 2024-5-28 17:13