plot.survcut: Plot a survcut object.

View source: R/OOP.R

plot.survcutR Documentation

Plot a survcut object.

Description

Plots Kaplan-Meier curves for the variable strata or a series of diagnostic plots visualizing the optimization process.

Usage

## S3 method for class 'survcut'
plot(
  x,
  type = c("km", "diagnostic"),
  palette = c("steelblue", "firebrick"),
  ggtheme = survminer::theme_survminer(),
  ...
)

Arguments

x

a survcut object.

type

plot type: 'km' plots a Kaplan-Meier plot, 'diagnostic' generates optimization plots.

palette

a color palette used in the Kaplan-Meier plot.

...

extra arguments passed to ggsurvplot.

Details

For Kaplan-Meier plots, a wrapper around ggsurvplot. Cutoff and p values are presented in the plot subtitle, complete observation counts are shown in the plot tag. If more cutoffs were identified, returns a list with the Kaplan-Meier plots.

Value

a ggplot or a list of ggplots.


PiotrTymoszuk/kmOptimizer documentation built on May 10, 2022, 3:22 p.m.