I was following the instructions on this page: https://strengejacke.github.io/ggeffects/articles/practical_robustestimation.html
I did a basic regression without robust standard errors:
data(mtcars)
reg <- glm(vs ~ mpg + cyl + disp + hp, mtcars, family="binomial")
screenreg(reg)
Then I got the predicted values:
> ggpredict(reg, "mpg")
Data were 'prettified'. Consider using `terms="mpg [all]"` to get smooth plots.
# Predicted probabilities of vs
mpg | Predicted | 95% CI
------------------------------
10 | 0.70 | [0.02, 1.00]
12 | 0.61 | [0.03, 0.99]
16 | 0.39 | [0.05, 0.89]
20 | 0.21 | [0.03, 0.70]
22 | 0.15 | [0.01, 0.70]
24 | 0.10 | [0.00, 0.74]
28 | 0.05 | [0.00, 0.86]
34 | 0.01 | [0.00, 0.96]
Adjusted for:
* cyl = 6.19
* disp = 230.72
* hp = 146.69
Say I wanted robust standard errors. I'm able to do this through coeftest and alter the screenreg output accordingly:
reg2 <- coeftest(reg, vcov = vcovHC, type = "HC1", cluster = "ResponseId")
screenreg(list(reg),
override.se=list(
reg2[,2]),
override.pvalues=list(
reg2[,4]))
However, when it came time to look at the predicted values in consideration of the robust standard errors, the values are exactly the same.
ggpredict(reg, "mpg", vcov_fun = "vcovHC", vcov_type = "HC1")
Data were 'prettified'. Consider using `terms="mpg [all]"` to get smooth plots.
# Predicted probabilities of vs
mpg | Predicted | 95% CI
------------------------------
10 | 0.70 | [0.02, 1.00]
12 | 0.61 | [0.03, 0.99]
16 | 0.39 | [0.05, 0.89]
20 | 0.21 | [0.03, 0.70]
22 | 0.15 | [0.01, 0.70]
24 | 0.10 | [0.00, 0.74]
28 | 0.05 | [0.00, 0.86]
34 | 0.01 | [0.00, 0.96]
Adjusted for:
* cyl = 6.19
* disp = 230.72
* hp = 146.69
I would assume that since the standard errors are different in the regression output, I would see the changes in the ggpredict output as well. What am I missing?