KaplanMeierComparison
Kaplan-Meier comparison family
Description
KaplanMeierComparison implements unadjusted grouped survival-curve comparisons and pairwise log-rank contrasts.
Summary rows follow associate.schema.comparison. Artifacts reuse the same curves, risk.table, and group.summary shape as Kaplan-Meier regression.
Super class
PolyGenius::ComparisonFamily -> KaplanMeierComparison
Methods
Public methods
Inherited methods
Method new()
Register the canonical family key for Kaplan-Meier comparisons.
Usage
KaplanMeierComparison$new()
Returns
The initialized family object with family.name = “km”.
Method validate.frame()
Validate the resolved frame for grouped Kaplan-Meier comparisons.
Usage
KaplanMeierComparison$validate.frame(frame, cell, options)
Arguments
-
frame -
Resolved analysis frame restricted to the current fit cell.
-
cell -
Named list describing the current fit-grid cell.
-
options -
Normalized comparison options from the engine.
Returns
Invisibly TRUE when the frame is compatible with the requested comparison.
Method prepare.frame()
Build the complete-case grouped survival frame for one Kaplan-Meier comparison cell.
Usage
KaplanMeierComparison$prepare.frame(frame, cell, options)
Arguments
-
frame -
Resolved analysis frame restricted to the current fit cell.
-
cell -
Named list describing the current fit-grid cell.
-
options -
Normalized comparison options from the engine.
Returns
A plain data frame ready for Kaplan-Meier fitting.
Method fit.comparison()
Fit grouped Kaplan-Meier and log-rank comparison objects.
Usage
KaplanMeierComparison$fit.comparison(frame, cell, options, ...)
Arguments
-
frame -
Prepared comparison frame returned by
prepare.frame(). -
cell -
Named list describing the current fit-grid cell.
-
options -
Normalized comparison options from the engine.
-
… -
Additional fitting arguments reserved for future use.
Returns
A named list containing survfit, survdiff, and the prepared data.
Method build.summary.rows()
Convert grouped Kaplan-Meier comparisons to shared comparison-schema rows.
Usage
KaplanMeierComparison$build.summary.rows(fit, frame, cell, options)
Arguments
-
fit -
Fitted comparison object returned by
fit.comparison(). -
frame -
Prepared comparison frame.
-
cell -
Named list describing the current fit-grid cell.
-
options -
Normalized comparison options from the engine.
Returns
A data.table of rows following associate.schema.comparison.
Method build.artifacts()
Return Kaplan-Meier curve artifacts for downstream visualization.
Usage
KaplanMeierComparison$build.artifacts(fit, frame, cell, options)
Arguments
-
fit -
Fitted comparison object returned by
fit.comparison(). -
frame -
Prepared comparison frame.
-
cell -
Named list describing the current fit-grid cell.
-
options -
Normalized comparison options from the engine.
Returns
A named list with curves, risk.table, and group.summary.
Method clone()
The objects of this class are cloneable with this method.
Usage
KaplanMeierComparison$clone(deep = FALSE)
Arguments
-
deep -
Whether to make a deep clone.