[R-sig-ME] Using Robust Standard Errors lme4

Daniel Lüdecke d@|uedecke @end|ng |rom uke@de
Tue Nov 9 10:32:58 CET 2021


Hi Suresh,

you could try the "parameters" package, which should (easily) return
different types of robust standard errors, including cluster-robust standard
errors for mixed models:

https://easystats.github.io/parameters/articles/model_parameters_robust.html

Maybe you try this out on a very small subset of your model to see if it
works. Also, since the "model_parameters()" function includes random effects
variances by default, you may set the effects-argument to "fixed" to speed
up computation. The call to the function could then look like something like
this:

model_parameters(
  model,
  effects = "fixed",
  robust = TRUE,
  vcov_estimation = "CL",
  vcov_type = "HC1",
  vcov_args = list(cluster = <your cluster variable from the data>)
)


Best
Daniel

-----Ursprüngliche Nachricht-----
Von: R-sig-mixed-models <r-sig-mixed-models-bounces using r-project.org> Im
Auftrag von Suresh N Neupane via R-sig-mixed-models
Gesendet: Montag, 8. November 2021 12:49
An: r-sig-mixed-models using r-project.org
Betreff: [R-sig-ME] Using Robust Standard Errors lme4

Dear all,
I am using lme4 package to run a hierarchical logistic regression model
(with random county effect) for my binomial dependent variable, COVID death
(0/1). This is a very large dataset with ~ 8 million observations.
I need to find the robust standard error but was not sure about any package.
I tried robustlmm (although my DV is not continuous) and got this error when
used MerDeriv (sandwich):
Error in UseMethod("estfun") :
no applicable method for 'estfun' applied to an object of class
"c('glmerMod', 'merMod')"
The real tricky part is it takes several hours to compute because of the
dataset length.
All I need is to get robust standard error values.
I already fit the models:
fit <- glmer(death ~ (1|county_fips_code) + IV).
Thank you so much,
Suresh Neupane


	[[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models using r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

--

_____________________________________________________________________

Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de
Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Joachim Prölß, Prof. Dr. Blanche Schwappach-Pignataro, Marya Verdel
_____________________________________________________________________

SAVE PAPER - THINK BEFORE PRINTING



More information about the R-sig-mixed-models mailing list