I do generate robust standard errors with library(sandwich) e.g.
library(sandwich)
cov.xxx <- vcovHC(xxx, type = "HC")
rob.std.err.xxx <- sqrt(diag(cov.xxx))
Then I would like to integrate that in a Latex export presenting several models in parallel. That works "well". I use
library(texreg)
texreg(list(x, xx, xxx, xxxx),
custom.model.names = c("1", "2", "3", "4"),
custom.coef.names = c("Constant",
"A", "B", "C", "D", "E", "F", "G", "H","I", "J", "K", "L",
"Wrong Sequenced Element",
"N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X"),
groups = list("Var1" = 1:5,
"Var2" = 6:14,
"Var3" = 15:19, "Var4" = 20:25),
sideways = T,
single.row = T,
override.se = list(c(0.1,0.1, 0.1, 0.1, 0.1),
c(0.1, 0.1, 0.1, 0.1, 0.1,
0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1),
c(0.1, 0.1, 0.1, 0.1, 0.1,
0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
0.1, 0.1, 0.1, 0.1, 0.1),
**rob.std.err.xxx #values from robust regression**
),
caption= "zzz",
return.string = TRUE, use.packages = FALSE , booktabs = TRUE, dcolumn = TRUE, digits = 3,
file = paste0(tablesdir, "xxxx.tex"))
However the order of attributes in rob.std.err.xxx does not correspond to my LM model. And I cannot figure out how to alter the SE override properly. If anybody can advise on the same procedure on p-values that would be very much appreciated!
All I would need is to alter the sequence in the rob.std.err.xxx and then export it into my target structure indicated above.
This question refers mainly to a texreg "issue". But as mentioned in the comment a solution exists.
Thanks in advance for any support.