Random Forest for Dynamic Risk Prediction or Recurrent Events: A Pseudo-Observation Approach

Abigail Loe, Susan Murray, Zhenke Wu

TL;DR

Researchers at the University of Michigan have developed RFRE.PO, a novel Random Forest algorithm designed to predict the risk of recurrent events (like disease flare-ups) over time. By combining "pseudo-observations"—a clever statistical trick to handle censored data—with machine learning, the method captures complex, non-linear relationships that traditional medical statistics often miss, significantly improving dynamic risk prediction for patients.

What Problem Does This Paper Address?

In many medical conditions, events don't just happen once; they recur. Think of asthma attacks, hospital readmissions, or COPD exacerbations. Predicting when the next event will happen is "dynamic risk prediction."

Two major hurdles make this difficult:

  1. Censoring: In clinical trials, we often lose track of patients or the study ends before an event occurs. We know they were event-free up to a point, but not forever.
  2. Complexity: Modern healthcare data (genomics, EHRs) is high-dimensional. Traditional regression models struggle when predictors are highly correlated or interact in "non-canonical" ways (e.g., a drug only works if a specific gene is present AND the patient is over 60).

Existing methods, like the XMT framework, use landmark analysis to handle the longitudinal nature of the data but rely on semi-parametric models that require researchers to manually specify every interaction—a nearly impossible task with hundreds of variables.

Methods

The authors bridge the gap between survival analysis and machine learning using a three-step pipeline:

  1. Data Reconstruction: They transform raw recurrent event data into a "censored longitudinal" format. They set "check-in" points (landmarks) and look at a follow-up window of length $\tau$ (e.g., 180 days) to see if an event occurred.
  2. Pseudo-Observations: To deal with censoring, they use a jack-knife-based "pseudo-observation" approach. This technique calculates a value for each patient that represents their probability of remaining event-free, even if they were censored. This effectively turns a "survival" problem into a "standard regression" problem that a Random Forest can understand.
  3. RFRE.PO Algorithm: They adapt a Random Forest specifically for longitudinal data. Unlike standard forests, this version accounts for the fact that one patient contributes multiple observations over time.
  4. Handling Missing History: Since a patient's past is often the best predictor of their future, but early study data might lack pre-enrollment history, the authors use multiple imputation to fill in those gaps based on clinician knowledge.

Datasets

  • Simulation Study: A synthetic dataset designed with intentionally complex, non-linear hazards and varying levels of correlation and censoring to stress-test the algorithm.
  • COPD Trial Data: Real-world data from the Azithromycin for the Prevention of Exacerbations of COPD study (Albert et al., 2011). This included 1,035 participants and a staggering 962 available covariates, ranging from demographics to sleep quality metrics.

Key Insights and Ideas

  • The "Aha" Moment for Pseudo-Observations: By using pseudo-observations, the researchers can treat censored survival data as if it were a continuous outcome. This unlocks the full power of non-parametric machine learning without the usual headaches of "right-censoring."
  • History is King: The paper demonstrates that incorporating a patient's event history (e.g., "how many flare-ups in the last year?") is essential. However, the way you include it matters; the Random Forest naturally finds the best "cut-points" for these history variables.
  • Automatic Interaction Detection: In the COPD data, the Random Forest outperformed traditional models because it could naturally handle the 900+ correlated variables without the researcher having to guess which ones interacted.

Key Results

  • Predictive Accuracy: In simulations with complex relationships, RFRE.PO consistently achieved higher C-statistics (a measure of how well the model ranks patient risk) compared to modified XMT models.
  • Real-World Performance: On the COPD validation set, RFRE.PO achieved a C-statistic of 0.613, outperforming both a "Clinical Input" model (0.565) and a "Forward Selection" model (0.570).
  • Calibration: The Random Forest also showed lower Mean Squared Error (MSE), meaning its predicted probabilities were closer to the actual observed outcomes.
  • Variable Importance: The model identified "time since last exacerbation" and "FEV1" (lung function) as top predictors, but also found value in "standardized pain scores" and "well-being" metrics that traditional models overlooked.

Limitations and Future Work

  • Causal Inference: The authors explicitly state that this tool is for prediction, not causation. It can tell you a patient is at high risk, but it doesn't necessarily prove that a specific variable (like a medication change) caused that risk.
  • Hyperparameter Tuning: While Random Forests are generally robust, the authors note that tuning parameters for longitudinal forests is still an emerging area of research.
  • Computational Cost: Reconstructing the dataset and running a forest on longitudinal pseudo-observations is more computationally intensive than a simple regression, though still feasible on modern hardware.

Reference: Loe, A., Murray, S., & Wu, Z. (2025). Random Forest for Dynamic Risk Prediction of Recurrent Events: A Pseudo-Observation Approach. Biostatistics.

Summary updated

Abstract

Recurrent events are common in clinical, healthcare, social and behavioral studies. A recent analysis framework for potentially censored recurrent event data is to construct a censored longitudinal data set consisting of times to the first recurrent event in multiple prespecified follow-up windows of length $τ$. With the staggering number of potential predictors being generated from genetic, -omic, and electronic health records sources, machine learning approaches such as the random forest are growing in popularity, as they can incorporate information from highly correlated predictors with non-standard relationships. In this paper, we bridge this gap by developing a random forest approach for dynamically predicting probabilities of remaining event-free during a subsequent $τ$-duration follow-up period from a reconstructed censored longitudinal data set. We demonstrate the increased ability of our random forest algorithm for predicting the probability of remaining event-free over a $τ$-duration follow-up period when compared to the recurrent event modeling framework of Xia et al. (2020) in settings where association between predictors and recurrent event outcomes is complex in nature. The proposed random forest algorithm is demonstrated using recurrent exacerbation data from the Azithromycin for the Prevention of Exacerbations of Chronic Obstructive Pulmonary Disease (Albert et al., 2011).
BibTeX
@inproceedings{loe2024random,
  author = {Abigail Loe and Susan Murray and Zhenke Wu},
  title = {{Random Forest for Dynamic Risk Prediction or Recurrent Events: A Pseudo-Observation Approach}},
  booktitle = {Biostatistics},
  year = {2024},
  doi = {10.1093/biostatistics/kxaf007},
}
Figure