When displaying tables of regressions (say with stargazer
or texreg::htmlreg
), is there a way where I can:
- Make the standard errors be displayed in a new, separate column next to the coefficient estimates?
- Have the output in html, while having the look of Latex produced tables (both
stargazer
andtexreg::htmlreg
do this, often referred to as "publication ready").
I've tried using:
single.row = TRUE
but that puts the standard errors into the same cell, not a new column.
Reproducible example below:
library(texreg)
library(stargazer)
mtcars
m1 <- lm(mpg ~ disp, data = mtcars)
m2 <- lm(mpg ~ disp + wt, data = mtcars)
htmlreg(list(m1, m2), file = "htmlreg_table.html", single.row = 1)
stargazer(m1, m2, out = "stargazer_table.html", single.row = TRUE)
As you can see, the output looks "publication ready", but the standard errors are in the same column, rather than in a new separate column.
I'm open to using any package, not only stargazer
or texreg
, which is why this question differs from:
report regression result using stargazer to add separate column for standard error