我想将几个回归的 summary(( 函数导出到一个汇总表中。通常我使用星空凝视。
问题是:我计算了异方差鲁棒性标准误差,这些误差通过使用特殊的汇总函数(例如"summary(fit5, robust=TRUE("(显示 - 但是如何将此汇总表的结果导出到导出表中?非常感谢您的帮助!
到目前为止没有任何效果。到目前为止,我使用导出类型文本并覆盖了值...
broom
包中的tidy
将为您提供回归系数:
library(broom)
fit <-lm(dist ~ speed, data = cars)
summary(fit) %>%
tidy()
# A tibble: 2 x 5
term estimate std.error statistic p.value
<chr> <dbl> <dbl> <dbl> <dbl>
1 (Intercept) -17.6 6.76 -2.60 1.23e- 2
2 speed 3.93 0.416 9.46 1.49e-12
对于那些对答案感兴趣的人!我找到了本教程:https://economictheoryblog.com/2018/05/18/cluster-robust-standard-errors-in-stargazer/
尽管如此,感谢所有试图提供帮助的人!