stata安装ivreghdfe报错怎么办

stata报错:救命!安装ivreghdfe,显示安装成功,但是运行就出现struct ms_vcvorthog undefined(817 lines skipped)
(error occurred while loading ivreghdfe.ado)
r(3000);
这怎么办?

这是因为ivreghdfe包依赖于一些其他的ado文件和程序,但是你的电脑上可能缺少这些依赖,导致加载ivreghdfe时出现错误。
解决方案有两种:

  1. 重新安装ivreghdfe包,在安装的时候添加依赖包。安装命令:
    ssc install ivreghdfe, replace dependencies
    这个命令会一并安装ivreghdfe依赖的所有ado文件和程序。
  2. 手动安装缺失的依赖包。根据错误信息,你可能缺少以下包:
    a. rms:可以使用命令 ssc install rms 安装
    b. robust:可以使用命令 ssc install robust 安装
    c. ivhettest:可以使用命令 ssc install ivhettest 安装