RFmstate-package: RFmstate: Random Forest-Based Multistate Survival Analysis

RFmstate-packageR Documentation

RFmstate: Random Forest-Based Multistate Survival Analysis

Description

Fits transition-specific cause-specific random survival forests on a clock-reset duration scale for acyclic, non-recurrent multistate processes. Patient/profile state probabilities are assembled by semi-Markov convolution and are conditional on fresh state entry. The package supports a common initial state, one recorded entry per state, baseline time-fixed covariates, competing exits, and independent right censoring. It does not support left truncation, cycles/recurrent visits, time-dependent covariates, or ongoing-sojourn dynamic prediction. A strict predictor contract prevents IDs, event/censoring times, response fields, and arbitrary long-format columns from entering a forest. Every full-data or cross-validation fit learns its predictor schema only from its own fitting rows, and every reported OOB statistic has verified OOB coverage. A calendar-time Aalen-Johansen point estimator is provided as a covariate-free descriptive baseline. The package provides:

  • State space and transition structure definition

  • Wide-to-long data conversion for multistate counting processes

  • Cause-specific random forest fitting per origin state

  • Entry-conditioned state probabilities via semi-Markov convolution

  • Aalen-Johansen point estimation (covariate-free baseline)

  • Per-transition feature importance

  • Genuine edge OOB concordance and patient-level cross-validated IPCW Brier scores

  • Comprehensive visualizations

Author(s)

Maintainer: Yiqing Chen y.chen@tamu.edu

Authors:

See Also

Useful links:


RFmstate documentation built on Sept. 10, 2026, 1:09 a.m.