刚才忽然遇到同样的问题,希望对后来人有帮助。
如何发生这个问题色?用reghdfe 做 regression + 用 estadd 总结结果,但table 中一直没有constant这个term, 无论怎么样调整 _cons 这个command. 各种查,发现Stata的一个大神说“ssc install reghdfe, replace” (这个帖子:
https://www.statalist.org/forums ... -with-nocons-option),运行了这个command, 就出现了帖子中提到的错误,卸载、重装reghdfe,重启Stata, 用Stata 18,都不行,一直是那个错误。
如何解决的?找到了这个帖子:
https://github.com/sergiocorreia/reghdfe/issues/237。似乎是 ftools 这个package, Stata没自动更新,所以没支持reghdfe 这个package的更新。根据文中的提示,运行“ssc install ftools, replace“,等待加载完成后,再运营之前 reghdfe 的回归,问题解决,并且现在 _cons 也出现了,两个问题同时解决。
我最初运行的代码,有1个月没用了,记得之前是完美的、constant是出现的,怎么这次就没了。现在看,感觉是ftools 的更新没有被Stata 自动抓取到,所以储存不了reghdfe 结果中 constant term 造成的。希望对后来人有帮助。