一覧 Case Studies Evaluating associations in longitudinal data using repeated-measures correlation (rmcorr)

Evaluating associations in longitudinal data using repeated-measures correlation (rmcorr)

* This article is based on an actual analysis project; however, in light of the confidentiality agreement (NDA) with the client, while maintaining the framework of the medical and healthcare field, specific details such as disease names and variables have been substantially altered from the actual case. We ask for your understanding in advance.

This case evaluated how the over-time usage status (log data) of a “therapeutic-support app (DTx)” introduced for patients with a particular chronic disease is associated with improvement in the patients’ “clinical laboratory values (outcomes).” In longitudinal (repeated-measures) data, where multiple data points are acquired from a single patient over a long period, performing simple correlation analysis carries the risk of producing spurious correlations.

Through this analysis, I aimed to statistically adjust for differences in each patient’s baseline (reference value) and to extract the true association between “variation in app-usage activity” and “variation in laboratory values” within the same patient. By using a special correlation method called Repeated Measures Correlation, Dr.DataScience eliminated the noise of individual differences and contributed to identifying effective digital-intervention indicators.

Background and objective

In this case, what was required was to clarify, in a patient group using the therapeutic-support app, “in which months patients used which app features more (viewing learning content, recording self-care, etc.) and tended to show improvement in symptom scores.” The main objective of the analysis was to comprehensively analyze the combinations of many “app-activity variables” and “clinical laboratory values / symptom scores” (dozens of patterns) and to quantitatively identify the important digital biomarkers (behavioral indicators) directly linked to treatment effect.

Data and variables

This analysis used per-patient app logs and electronic medical-record data spanning multiple months, provided by a particular medical institution. The main variables analyzed were as follows.

    • Cluster variable: patient identification ID
    • Evaluation variables 1 (intervention indicators): monthly app-usage activity such as “viewing time of learning videos,” “completion rate of online questionnaires,” and “number of days of self-care recording” (continuous variables).
    • Evaluation variables 2 (clinical outcomes): monthly “mean pain score (VAS),” “blood concentration of a particular biomarker,” “QOL score,” etc. (continuous variables).

Analytical methods

In this case, to correctly evaluate the data structure acquired multiple times from the same patient (repeated-measures data), I selected and applied the following statistical methods.

  1. Evaluation of correlations
    • Adopted method: Repeated Measures Correlation
      Data acquired over multiple months from the same patient contain patient-specific “individual differences (differences in baseline).” I adopted repeated-measures correlation because it can adjust for the differing intercept (reference value) of each patient using an analysis-of-covariance (ANCOVA) approach and estimate the “slope (correlation) between two variables within the same patient” common to all patients. Using parallel processing (multiprocessing), I comprehensively and rapidly calculated the correlations of an enormous number of variable pairs.
    • Methods not adopted: Pearson correlation analysis and Spearman’s rank correlation coefficient
      Pearson correlation analysis and Spearman’s rank correlation coefficient have as a fundamental premise that “all data are mutually independent (data taken once each from different people).” Feeding longitudinal data like this directly into these methods carries an extremely high risk of causing “Simpson’s paradox (the ecological fallacy),” in which individual differences among patients are mistaken for correlation, leading to erroneous conclusions (such as a positive correlation being calculated as a negative one); I therefore clearly excluded them.
  2. Calculation of confidence intervals
    • To evaluate not only the strength of each correlation coefficient (R value) but also the variability of its estimation precision, I calculated a 95% confidence interval (CI) for all variable pairs, ensuring the certainty of the results.

Overview of the main results and clinical considerations

As a result of the comprehensive repeated-measures correlation analysis, a significant within-patient negative correlation was found between “the number of days of self-care recording” and “the mean pain score (VAS)” (p = 0.002). This is not a between-patient comparison along the lines of “people who keep diligent records to begin with have less pain,” but rather a clinically meaningful result closer to suggesting causality: “within the same patient, months with more recording days tend to show reduced pain compared with months with fewer.”

On the other hand, no statistically significant correlation was found between “the viewing time of learning videos” and the various clinical outcomes (for example, p = 0.450).

From these results, it was suggested that “active self-monitoring,” in which patients themselves input their daily condition, has a stronger association with symptom control than “passive use,” in which one merely opens the app and views content.

Dr.DataScience’s contribution

In this case, Dr.DataScience eliminated the “spurious correlations” lurking in a large volume of time-series data and extracted associations of true clinical significance.

  1. Advanced method selection suited to the data structure
    • Avoiding the risk of carelessly applying Pearson correlation analysis to repeated-measures data, I precisely applied repeated-measures correlation (rmcorr). This prevented a statistical fallacy (Simpson’s paradox) and provided rigorous analytical results with high validity as a medical paper.
  2. Optimization of computational efficiency
    • In the correlation calculations for all combinations (hundreds of pairs) of dozens of app-activity variables and clinical variables, by implementing parallel processing I substantially shortened the analysis time and supported prompt decision-making.
  3. Creating evidence for intervention optimization
    • For the most important challenge in app development and operation—”which feature’s use should be encouraged to more readily lead to improvement in patient outcomes”—I provided statistically backed, objective indicators. This made it possible to update the therapeutic app more effectively and to formulate precise usage-guidance plans for patients.

© Dr.データサイエンス. All Rights Reserved.