I run a glm() using robust standard errors. For a subsequent model comparison I calculate the difference of two regression models (coefficients & se). For that calculation I use the summary() function. However, the summary function of the models show different standard errors than the ones I get from coeftest(). Values for coefficients remain identical.
Input:
mod.01 <- glm(dep ~ indep1 + indep2 + indep3,
family = binomial (link = "logit"), data = data)
coeftest(mod.01, vcov. = vcovHC, type= "HC3", df = NULL)
summary(mod.01, robust=T)
Output:
coeftest()
Estimate Std. Error t value Pr(>|t|)
(Intercept) -2.72917626 0.16367787 -16.6741 < 2.2e-16 ***
indep1 0.00427870 0.41928906 0.0102 0.991859
indep2 2.00243724 0.19757861 10.1349 < 2.2e-16 ***
indep3 0.36385098 0.32783817 1.1098 0.267159
summary()
Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.7291763 0.1758744 -15.518 < 2e-16 ***
indep1 0.0042787 0.3389472 0.013 0.98993
indep2 2.0024372 0.1746829 11.463 < 2e-16 ***
indep3 0.3638510 0.2604196 1.397 0.16236
How do I get the robust se of mod.01 into the summary function? So that eventually my subsequent calculation includes the correct robust se will also be shown shown in the regression table.
Thanks in advance!