有没有办法减少 htmlreg-table 的垂直大小?我有大约 10 个或更多 IV 的严重模型。所以 atm 我需要一整页来展示我的回归结果。我想通过报告 SD 或 SE(括号中)内联(旁边)系数来节省一些行。直接的方法是手动在乳胶中创建输出表。有没有简单的解决方案(更优雅的方式)?
library(texreg)
alligator = data.frame(
lnLength = c(3.87, 3.61, 4.33, 3.43, 3.81, 3.83, 3.46, 3.76,
3.50, 3.58, 4.19, 3.78, 3.71, 3.73, 3.78),
lnWeight = c(4.87, 3.93, 6.46, 3.33, 4.38, 4.70, 3.50, 4.50,
3.58, 3.64, 5.90, 4.43, 4.38, 4.42, 4.25)
)
alli.mod = lm(lnWeight ~ lnLength, data = alligator)
htmlreg(list(alli.mod),
file="MWE_regression.html",
caption="MWE Regression",
caption.above = TRUE,
include.rs=TRUE,
include.adjrs = FALSE,
digits=3,
stars=c(0.01, 0.05, 0.1)
)
谢谢 :)
更新惊人、简单和优雅的解决方案是使用 stargazer-package。相当新:http ://www.r-statistics.com/2013/01/stargazer-package-for-beautiful-latex-tables-from-r-statistical-models-output/这个包可以导出精彩的latex-tables,比texreg好多了。