clustra: A multi-platform k-means clustering algorithm for analysis of longitudinal trajectories in large electronic health records data

📅 2025-07-01
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Irregular and heterogeneous longitudinal biometric trajectories in electronic health records (EHRs) pose challenges for robust phenotyping and cross-institutional analysis. Method: We propose a cross-platform analytical framework integrating thin-plate spline regression for asynchronous time-series smoothing with k-means clustering for clinical phenotype identification. The method ensures algorithmic consistency and reproducibility across R and SAS implementations, augmented by multi-core parallelization, joint evaluation using the Adjusted Rand Index and silhouette coefficient, and flexible parameter tuning with integrated visualization. Results: Validation on simulated blood pressure data demonstrates high inter-platform clustering concordance (Adjusted Rand Index > 0.95), substantially enhancing modeling robustness for irregular longitudinal data and compatibility across heterogeneous EHR systems. This framework provides a generalizable, scalable, and reproducible technical foundation for multi-platform EHR phenotyping studies.

Technology Category

Application Category

📝 Abstract
Background and Objective: Variables collected over time, or longitudinally, such as biologic measurements in electronic health records data, are not simple to summarize with a single time-point, and thus can be more holistically conceptualized as trajectories over time. Cluster analysis with longitudinal data further allows for clinical representation of groups of subjects with similar trajectories and identification of unique characteristics, or phenotypes, that can be investigated as risk factors or disease outcomes. Some of the challenges in estimating these clustered trajectories lie in the handling of observations at inconsistent time intervals and the usability of algorithms across programming languages. Methods: We propose longitudinal trajectory clustering using a k-means algorithm with thin-plate regression splines, implemented across multiple platforms, the R package clustra and corresponding SAS macros. The SAS macros accommodate flexible clustering approaches, and also include visualization of the clusters, and silhouette plots for diagnostic evaluation of the appropriate cluster number. The R package, designed in parallel, has similar functionality, with additional multi-core processing and Rand-index-based diagnostics. Results: The package and macros achieve comparable results when applied to an example of simulated blood pressure measurements based on real data from Veterans Affairs Healthcare recipients who were initiated on anti-hypertensive medication. Conclusion: The R package clustra and the SAS macros integrate a K-means clustering algorithm for longitudinal trajectories that operates with large electronic health record data. The implementations provide comparable results in both platforms, satisfying the needs of investigators familiar with, or constrained by access to, one or the other platform.
Problem

Research questions and friction points this paper is trying to address.

Clustering longitudinal trajectories in large EHR data
Handling inconsistent time intervals in trajectory analysis
Providing multi-platform k-means algorithm for diverse users
Innovation

Methods, ideas, or system contributions that make the work stand out.

K-means clustering for longitudinal trajectories
Thin-plate regression splines integration
Multi-platform R and SAS implementation
🔎 Similar Papers
No similar papers found.
N
Nimish Adhikari
US Department of Veteran Affairs
H
Hanna Gerlovin
Boston University School of Public Health
George Ostrouchov
George Ostrouchov
University of Tennessee and Oak Ridge National Laboratory (retired)
Scalable Statistical ComputingData ScienceComputational Statistics
R
Rachel Ehrbar
US Department of Veteran Affairs
A
Alyssa B. Dufour
Marcus Institute for Aging Research
B
Brian R. Ferolito
US Department of Veteran Affairs
S
Serkalem Demissie
US Department of Veteran Affairs
L
Lauren Costa
US Department of Veteran Affairs
Y
Yuk-Lam Ho
US Department of Veteran Affairs
L
Laura Tarko
US Department of Veteran Affairs
Edmon Begoli
Edmon Begoli
Oak Ridge National Laboratory (ORNL)
ai securitytext analysis
K
Kelly Cho
Harvard Medical School
D
David R. Gagnon
Boston University Chobanian & Avedisian School of Medicine