summary.rfmstate: Summary of Random Forest Multistate Model

View source: R/summary.R

summary.rfmstateR Documentation

Summary of Random Forest Multistate Model

Description

Provides a comprehensive summary of the fitted model including per-origin state information, OOB prediction error, and transition event counts.

Usage

## S3 method for class 'rfmstate'
summary(object, ...)

Arguments

object

A fitted rfmstate model.

...

Ignored.

Details

The per-edge OOB concordance is 1 - prediction.error from ranger for that edge's binary cause-specific endpoint. The printed summary also lists every forwarded ranger argument.

Value

An object of class "summary.rfmstate" containing the stored call, covariates, forest parameters, patient/event/interval totals, structure, and a per-edge table of risk-set size, target events, competing/non-target exits, external censoring, ranger OOB error, ranger OOB concordance, and verified OOB coverage.

Limitations

Edge OOB values do not validate assembled full-state probabilities and may be unstable for sparse transitions. Use diagnose(..., method = "cv") for patient-level held-out full-state Brier scoring.

Examples


ms <- clinical_states()
dat <- sim_clinical_data(n = 200, structure = ms, seed = 42)
msdata <- prepare_data(
  data = dat, id = "ID", structure = ms,
  time_map = list(
    Responded = "time_Responded",
    Unresponded = "time_Unresponded",
    Stabilized = "time_Stabilized",
    Progressed = "time_Progressed",
    Death = "time_Death"
  ),
  censor_col = "time_censored",
  covariates = c("age", "sex", "BMI", "treatment")
)
fit <- rfmstate(msdata, num.trees = 100, seed = 42)
summary(fit)



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