全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
5887 4
2023-10-24
首先我去网站下载了ivreghdfe、ftools、reghdfe zip文件后解压,放到了我STATA文件中
然后用了大佬的命令:因为害怕以前有相关文件,所以用了force
. cap ado uninstall ftools
. cap ado uninstall reghdfe
. cap ado uninstall ivreghdfe
. net install ftools, from(D:\论文研究工具\STATA\ftools-master\src) force
checking ftools consistency and verifying not already installed...
installing into c:\ado\plus\...
installation complete.
. net install reghdfe, from(D:\论文研究工具\STATA\reghdfe-master\src) force
checking reghdfe consistency and verifying not already installed...
installing into c:\ado\plus\...
installation complete.
. net install ivreghdfe, from(D:\论文研究工具\STATA\ivreghdfe-master\src) force
checking ivreghdfe consistency and verifying not already installed...
the following files will be replaced:
    c:\ado\plus\i\ivreghdfe.ado
    c:\ado\plus\i\ivreghdfe.sthlp
installing into c:\ado\plus\...
installation complete.

但是之后使用ivreghdfe的时候:ivreghdfe y 控制变量(x1=IV),absorb(year ind) cluster(id) first endog(x1)
报错:
invalid syntax
(error occurred while loading ivreghdfe.ado)
r(198);
请问有大佬知道为什么吗?


二维码

扫码加我 拉你入群

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

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

全部回复
2023-10-24 22:13:24
因为回归的时候用的reghdfe命令,所以做工具变量检验内生性的时候要用ivreghdfe。但是现在报错做不出来。
二维码

扫码加我 拉你入群

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

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

2023-10-25 22:19:52
我安装了stata17,可以用了。
二维码

扫码加我 拉你入群

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

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

2023-11-24 11:29:57
我之前运行不了也是重复报错,重新安装了以下命令(如果有某一条运行不了可以先安装其他安装包比如ivreg2或reghdfe,然后再选中四条安装命令同时运行)。
stata中直接help ivreghdfe会弹出网址,网址上有这几条命令的说明
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
cap ado uninstall reghdfe
net install reghdfe, from("https://raw.githubusercontent.com/sergiocorreia/reghdfe/master/src/")

* Install ivreg2, the core package
cap ado uninstall ivreg2
ssc install ivreg2

* Finally, install this package
cap ado uninstall ivreghdfe
net install ivreghdfe, from(https://raw.githubusercontent.co ... eghdfe/master/src/)
二维码

扫码加我 拉你入群

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

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

2024-8-3 21:56:47
博主解决了吗这个问题
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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