Derivative Computations and Robust Standard Errors for Linear Mixed Effects Models in lme4
Ting Wang, Edgar C. Merkle

TL;DR
This paper introduces new functions for Gaussian mixed models in lme4 to compute derivatives and robust standard errors, addressing a gap in available statistical tools for these models.
Contribution
It provides the first methods to extract Hessian and gradient information from lme4 for robust error estimation, with implementation and practical illustration.
Findings
New functions estfun.lmerMod() and vcov.full.lmerMod() enable derivative extraction.
Robust standard errors can be computed for lme4 models using these functions.
Comparison with lavaan demonstrates the methods' effectiveness.
Abstract
While robust standard errors and related facilities are available in R for many types of statistical models, the facilities are notably lacking for models estimated via lme4. This is because the necessary statistical output, including the Hessian and casewise gradient of random effect parameters, is not immediately available from lme4 and is not trivial to obtain. In this article, we supply and describe two new functions to obtain this output from Gaussian mixed models: estfun.lmerMod() and vcov.full.lmerMod(). We discuss the theoretical results implemented in the code, focusing on calculation of robust standard errors via package sandwich. We also use the Sleepstudy data to illustrate the code and compare it to a benchmark from package lavaan.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsStatistical Methods and Bayesian Inference · Statistical Methods and Inference · Data Analysis with R
