Skip to contents

Prepares observed outcome status over time horizons and creates a self-contained HTML report containing raw observed outcome accounting (target events, competing events, censored, and non-events).

Usage

create_summary_report_times(
  reals,
  times,
  fixed_time_horizons,
  output_file = "summary_report_times.html",
  output_dir = getwd(),
  renderer = "browser"
)

Arguments

reals

A numeric vector (or list of numeric vectors) containing binary or multi-state outcome labels (0 = censored/no event, 1 = target event, 2 = competing outcome).

times

A numeric vector (or list of numeric vectors) containing follow-up times corresponding to reals.

fixed_time_horizons

A numeric vector of fixed evaluation time horizons at which to display state distributions.

output_file

The name of the output HTML file. Defaults to "summary_report_times.html".

output_dir

The directory where the report HTML file will be saved. Defaults to the current working directory.

renderer

Character string specifying the rendering engine. Currently, only "browser" is supported.

Details

Censored observations are displayed as their own observed status. No Aalen-Johansen (AJ), Inverse Probability of Censoring Weighting (IPCW), or other censoring adjustment is applied. This report contains only raw observed outcome status over time and does not include predicted probabilities, calibration, discrimination metrics, threshold-based metrics, or decision-curve analysis.

Examples

if (FALSE) { # \dontrun{
times <- c(24.1, 9.7, 49.9, 18.6, 34.8, 14.2, 39.2, 46.0, 31.5, 4.3)
reals <- c(1, 1, 1, 1, 0, 2, 1, 2, 0, 1)
fixed_time_horizons <- c(10, 20, 30, 40, 50)

create_summary_report_times(
  reals = reals,
  times = times,
  fixed_time_horizons = fixed_time_horizons,
  output_file = "time_summary_report.html"
)
} # }