I am using the lme4
package for linear mixed effect modeling
The mixed-effect model is:
fm01 <- lmer(sublat <- goal + (1|userid))
The above command returns an S4 object called fm01
.
This object includes fixed effects and their OLS standard errors (below)
Fixed effects:
Estimate Std. Error t value
(Intercept) 31.644 3.320 9.530
goaltypeF1 -4.075 3.243 -1.257
goaltypeF2 -9.187 5.609 -1.638
goaltypeF3 -13.935 9.455 -1.474
goaltypeF4 -20.219 8.196 -2.467
goaltypeF5 -12.134 8.797 -1.379"
However, I need to provide robust standard errors.
How can I do this with an S4 object such as returned by lme4
?
vignette("sandwich-OOP",package="sandwich")
and figure out how to writeestfun.merMod
andbread.merMod
functions, starting fromsandwich:::estfun.lm
andsandwich:::bread.lm
and adapting as necessary. – Hearst