Using the package lfe, I can generate the regression results with either robust standard error or clustered standard error using command felm.
For the standard regression, I can export the regression table with the texreg package using function screenreg, texreg or htmlreg. However, if I want to get the regression with the robust standard error in lfe package, I need to add the option robust=T in the summary function, therefore, I wonder how I can export the regression table using texreg package in the case I mentioned here? See below for the demo code.
library(lfe);library(texreg)
OLS1<-felm(Sepal.Length~Sepal.Width |0|0|0, data = iris)
summary(OLS1, robust=TRUE)
summary(OLS1)
OLS2<-felm(Sepal.Length~Sepal.Width |0|0|Species, data = iris)
summary(OLS2)
screenreg(list(OLS1,OLS2),caption = "Linear regression")
You can change the line
s <- summary(model)tos <- summary(model, ...)in the extract function in thetexregpackage:Then you should be able to hand over a
robust = TRUEargument toscreenregortexregcalls: