Phi*_*hil 6 r robust standard-error stata logistic-regression
我正在尝试从 R 中的生存包中获取 clogit 回归的可靠标准错误。在此过程中,我尝试使用该选项复制 Stata 命令报告的标准clogit错误vce(robust)。
我的 R 公式是
conditional_logit <- clogit(dependent_variable ~ independent_variable + some_controls + strata(year), method= "exact", data = data_frame)
Run Code Online (Sandbox Code Playgroud)
将参数添加robust = TRUE到函数失败并出现错误:
Error in residuals.coxph(fit2, type = "dfbeta", weighted = TRUE) :
score residuals are not available for the exact method
Run Code Online (Sandbox Code Playgroud)
任何通过三明治或 plm 包提取稳健标准错误(如此处、此处、此处和此处建议)的尝试都会失败并出现相同的错误。类似地,clogit 函数包含一个在使用该方法时停止尝试计算稳健标准误差的条件exact(第 44 行)。但是,conditional_logit$residuals 和conditional_logit$score 存在于clogit 回归对象中。
如果有人能帮助回答以下问题,我将不胜感激:
| 归档时间: |
|
| 查看次数: |
1878 次 |
| 最近记录: |