merDeriv: Derivative Computations for Linear Mixed Effects Models with Application to Robust Standard Errors

While likelihood-based derivatives 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, Fisher information and casewise contributions to the model gradient, is not immediately available from lme4 and is not trivial to obtain. In this article, we describe merDeriv, an R package which supplies new functions to obtain analytic output from Gaussian mixed models. 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 package and to compare it to a benchmark from package lavaan.

[1]  Achim Zeileis Object-oriented Computation of Sandwich Estimators , 2006 .

[2]  Manuel Koller,et al.  Robust Estimation of Linear Mixed Models , 2013 .

[3]  Achim Zeileis,et al.  Partykit: a modular toolkit for recursive partytioning in R , 2015, J. Mach. Learn. Res..

[4]  P. J. Huber The behavior of maximum likelihood estimates under nonstandard conditions , 1967 .

[5]  C. McCulloch,et al.  Generalized Linear Mixed Models , 2005 .

[6]  Daniel L. Oberski,et al.  lavaan.survey: An R Package for Complex Survey Analysis of Structural Equation Models , 2014 .

[7]  Achim Zeileis,et al.  Tests of Measurement Invariance Without Subgroups: A Generalization of Classical Methods , 2013, Psychometrika.

[8]  K. Hornik,et al.  Generalized M‐fluctuation tests for parameter instability , 2007 .

[9]  W. Stroup Generalized Linear Mixed Models: Modern Concepts, Methods and Applications , 2012 .

[10]  H. White A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity , 1980 .

[11]  Achim Zeileis,et al.  Score-based tests of measurement invariance: use in practice , 2014, Front. Psychol..

[12]  Douglas L. Miller,et al.  Robust Inference with Multi-Way Clustering , 2006 .

[13]  H. Goldstein,et al.  Efficient Analysis of Mixed Hierarchical and Cross-Classified Random Structures Using a Multilevel Model , 1994 .

[14]  Maria L. Thomas,et al.  Patterns of performance degradation and restoration during sleep restriction and subsequent recovery: a sleep dose‐response study , 2003, Journal of sleep research.

[15]  Manuel Koller,et al.  robustlmm : An R Package for Robust Estimation of Linear Mixed-Effects Models , 2016 .

[16]  Yves Rosseel,et al.  lavaan: An R Package for Structural Equation Modeling , 2012 .

[17]  Kaare Brandt Petersen,et al.  The Matrix Cookbook , 2006 .

[18]  D. Bates,et al.  Fitting Linear Mixed-Effects Models Using lme4 , 2014, 1406.5823.

[19]  F. Eicker Limit Theorems for Regressions with Unequal and Dependent Errors , 1967 .

[20]  D. Freedman,et al.  On The So-Called “Huber Sandwich Estimator” and “Robust Standard Errors” , 2006 .