Generalized Mixed Modeling in Massive Electronic Health Record Databases: What is a Healthy Serum Potassium?

Converting electronic health record (EHR) entries to useful clinical inferences requires one to address computational challenges due to the large number of repeated observations in individual patients. Unfortunately, the libraries of major statistical environments which implement Generalized Linear Mixed Models for such analyses have been shown to scale poorly in big datasets. The major computational bottleneck concerns the numerical evaluation of multivariable integrals, which even for the simplest EHR analyses may involve hundreds of thousands or millions of dimensions (one for each patient). The Laplace Approximation (LA) plays a major role in the development of the theory of GLMMs and it can approximate integrals in high dimensions with acceptable accuracy. We thus examined the scalability of Laplace based calculations for GLMMs. To do so we coded GLMMs in the R package TMB. TMB numerically optimizes complex likelihood expressions in a parallelizable manner by combining the LA with algorithmic differentiation (AD). We report on the feasibility of this approach to support clinical inferences in the HyperKalemia Benchmark Problem (HKBP). In the HKBP we associate potassium levels and their trajectories over time with survival in all patients in the Cerner Health Facts EHR database. Analyzing the HKBP requires the evaluation of an integral in over 10 million dimensions. The scale of this problem puts far beyond the reach of methodologies currently available. The major clinical inferences in this problem is the establishment of a population response curve that relates the potassium level with mortality, and an estimate of the variability of individual risk in the population. Based on our experience on the HKBP we conclude that the combination of the LA and AD offers a computationally efficient approach for the analysis of big repeated measures data with GLMMs.

[1]  J. Nelder,et al.  Generalized Linear Models with Random Effects: Unified Analysis via H-likelihood , 2006 .

[2]  Mulugeta Gebregziabher,et al.  Fitting parametric random effects models in very large data sets with application to VHA national data , 2012, BMC Medical Research Methodology.

[3]  J. Nelder,et al.  Hierarchical Generalized Linear Models , 1996 .

[4]  E. Nilsson,et al.  Incidence and determinants of hyperkalemia and hypokalemia in a large healthcare system. , 2017, International journal of cardiology.

[5]  Patrick O. Perry Fast moment‐based estimation for hierarchical models , 2015, 1504.04941.

[6]  L. Ryan,et al.  Sufficiency Revisited: Rethinking Statistical Algorithms in the Big Data Era , 2017 .

[7]  D. Collins The performance of estimation methods for generalized linear mixed models , 2008 .

[8]  Moudud Alam,et al.  hglm: A Package for Fitting Hierarchical Generalized Linear Models , 2010, R J..

[9]  H. Skaug Automatic Differentiation to Facilitate Maximum Likelihood Estimation in Nonlinear Random Effects Models , 2002 .

[10]  John P. A. Ioannidis,et al.  Opportunities and challenges in developing risk prediction models with electronic health records data: a systematic review , 2017, J. Am. Medical Informatics Assoc..

[11]  Hans J. Skaug,et al.  Automatic approximation of the marginal likelihood in non-Gaussian hierarchical models , 2006, Comput. Stat. Data Anal..

[12]  S. Brunelli,et al.  Association between Serum Potassium and Outcomes in Patients with Reduced Kidney Function. , 2016, Clinical journal of the American Society of Nephrology : CJASN.

[13]  H. Krumholz Big data and new knowledge in medicine: the thinking, training, and tools needed for a learning health system. , 2014, Health affairs.

[14]  Anders Nielsen,et al.  TMB: Automatic Differentiation and Laplace Approximation , 2015, 1509.00660.

[15]  G. Galasso,et al.  Big Health Data and Cardiovascular Diseases: A Challenge for Research, an Opportunity for Clinical Care , 2019, Front. Med..

[16]  David Ruppert,et al.  Semiparametric regression during 2003-2007. , 2009, Electronic journal of statistics.

[17]  D. Bates,et al.  Big data in health care: using analytics to identify and manage high-risk and high-cost patients. , 2014, Health affairs.

[18]  M. Unruh,et al.  Analysis of Time to Event Outcomes in Randomized Controlled Trials by Generalized Additive Models , 2015, PloS one.

[19]  Jeffrey Dean,et al.  Scalable and accurate deep learning with electronic health records , 2018, npj Digital Medicine.

[20]  J. Nelder,et al.  Hierarchical generalised linear models: A synthesis of generalised linear models, random-effect models and structured dispersions , 2001 .

[21]  Casper W. Berg,et al.  glmmTMB Balances Speed and Flexibility Among Packages for Zero-inflated Generalized Linear Mixed Modeling , 2017, R J..

[22]  Deepak Agarwal,et al.  GLMix: Generalized Linear Mixed Models For Large-Scale Response Prediction , 2016, KDD.

[23]  Emmanuel Lesaffre,et al.  Hierarchical Generalized Linear Models: The R Package HGLMMM , 2011 .