Describing variability of intensively collected longitudinal ordinal data with latent spline models

Mark Lunt, David Selby, William G Dixon

Abstract

Population health studies increasingly collect longitudinal, patient-reported symptom data via mobile devices, offering unique insights into experiences outside clinical settings, such as pain, fatigue or mood. However, such data present challenges due to ordinal measurement scales, irregular sampling and temporal autocorrelation. This paper introduces two novel summary measures for analysing ordinal outcomes: (1) the mean absolute deviation from the median (MADM) for cross-sectional analyses and (2) the mean absolute deviation from expectation (MADE) for longitudinal data. The latter is based on a latent cumulative model with penalized splines, enabling smooth transitions between irregular time points while accounting for the ordinal nature of the data. Unlike black-box machine learning approaches, this method is interpretable, computationally efficient and easy to implement in standard statistical software. Through simulations, we demonstrate that the proposed measures outperform standard methods when the assumptions of normality or stationarity are violated. Application to real-world data from a national smartphone study, Cloudy with a Chance of Pain, highlights the utility of these measures in characterising symptom variability and trends over time.

Introduction

In the field of digital health (mHealth), researchers are increasingly utilizing "intensive longitudinal data"—frequent symptom reports collected via smartphones or wearables. While rich in information, this data is notoriously difficult to analyze for three primary reasons:

  1. Ordinal Scales: Pain isn't a continuous number like temperature. A jump from "mild" to "moderate" isn't necessarily the same "distance" as a jump from "severe" to "very severe."
  2. Irregular Sampling: Patients do not always log their symptoms at perfectly spaced intervals.
  3. Temporal Autocorrelation: A patient's state today is highly dependent on their state yesterday, creating "smooth" trends that standard independent statistics often ignore.

Traditional approaches often treat ordinal scales as continuous numbers and calculate standard deviations, an assumption that can lead to misleading conclusions. Conversely, complex machine learning models may offer high predictive accuracy but lack the interpretability required for clinical decision-making. This research introduces a middle ground: a robust statistical framework for quantifying ordinal variability through latent spline models.

Methodology: MADM and MADE

The authors propose two primary metrics to characterize variability in ordinal data:

  • MADM (Mean Absolute Deviation from the Median): A cross-sectional measure that calculates the average "step distance" from the median category, avoiding the ill-defined mean for ordinal data.
  • MADE (Mean Absolute Deviation from Expectation): A longitudinal measure that quantifies how much a patient’s reported symptom deviates from a predicted smooth trend.

To derive the "expected" trend, the researchers employ Latent Ordinal Spline Models. This approach assumes an unobserved, continuous "latent state" of the symptom. It uses penalized splines (P-splines) to fit a flexible curve to this latent state. The "penalized" aspect is crucial; it prevents overfitting by penalizing excessive "wiggliness," allowing the data itself to determine the necessary complexity of the trend.

Validation through Simulation

The methods were first tested on simulated datasets representing eight distinct 100-day pain trajectories, including constant pain, linear trends, and sinusoidal fluctuations.

Figure 1: Simulated pain level patterns (a-h) over 100 days. The MADM values illustrate how the metric captures cross-sectional variability across different systematic trends.

The simulations demonstrated that the model effectively distinguishes between random noise and systematic trends. For instance, in "wavy" pain patterns, the MADE was significantly lower than the MADM, indicating that the spline model successfully captured the underlying rhythmic trend.

Real-World Application: Cloudy with a Chance of Pain

The framework was applied to data from the "Cloudy with a Chance of Pain" study, involving 2,197 UK participants with chronic conditions like Rheumatoid Arthritis (RA) and Osteoarthritis. Key findings included:

  • Non-linear Dynamics: 79% of RA patients exhibited non-linear, fluctuating pain patterns, rather than simple linear trends. Only 7.5% of all participants showed a simple linear trend, highlighting the necessity of flexible spline models.
  • Trend Complexity: The model uses "Effective Degrees of Freedom" (EDF) to quantify "wiggliness." Higher EDF values correlate with more complex, volatile symptom fluctuations, providing a concrete metric for clinical "flare-ups."
  • Explanatory Power: By comparing MADE to MADM, researchers can determine the proportion of variability attributable to systematic time trends versus random daily noise. This acts as a relative reduction in deviation, similar to an $R^2$ value.

Conclusion and Future Directions

This research provides intuitive, interpretable tools for analyzing patient-reported outcomes in longitudinal studies. While challenges remain—such as the subjective nature of pain scales and the assumption of equal "steps" between categories—these latent spline models offer a significant advancement over treating ordinal data as continuous. Future work may leverage these tools for causal discovery, such as evaluating how environmental factors or interventions specifically impact the latent symptom curve.

Summary updated

Abstract

Abstract Population health studies increasingly collect longitudinal, patient-reported symptom data via mobile devices, offering unique insights into experiences outside clinical settings, such as pain, fatigue or mood. However, such data present challenges due to ordinal measurement scales, irregular sampling and temporal autocorrelation. This paper introduces two novel summary measures for analysing ordinal outcomes: (1) the mean absolute deviation from the median (M adm ) for cross-sectional analyses and (2) the mean absolute deviation from expectation (Made) for longitudinal data. The latter is based on a latent cumulative model with penalized splines, enabling smooth transitions between irregular time points while accounting for the ordinal nature of the data. Unlike black-box machine learning approaches, this method is interpretable, computationally efficient and easy to implement in standard statistical software. Through simulations, we demonstrate that the proposed measures outperform standard methods when the assumptions of normality or stationarity are violated. Application to real-world data from a national smartphone study, Cloudy with a Chance of Pain , highlights the utility of these measures in characterising symptom variability and trends over time. The methods developed here provide intuitive tools for analysing patient-reported outcomes in longitudinal studies, with potential applications in prediction modelling, causal discovery and evaluation of interventions.
BibTeX
@inproceedings{lunt2025describing,
  author = {Mark Lunt and David Selby and William G Dixon},
  title = {{Describing variability of intensively collected longitudinal ordinal data with latent spline models}},
  booktitle = {Scientific},
  year = {2025},
  doi = {10.1038/s41598-025-13993-2},
}
Figure