plot.surv_obj: Plot general survival models

View source: R/survival_operations.R

plot.surv_objR Documentation

Plot general survival models

Description

Plot general survival models

Usage

## S3 method for class 'surv_obj'
plot(
  x,
  times,
  type = c("surv", "prob"),
  join_col = "red",
  join_pch = 20,
  join_size = 3,
  ...
)

Arguments

x

a survival object of class surv_aft, surv_add_haz, surv_ph, surv_po, surv_model, surv_pooled, or surv_projection.

times

Times at which to evaluate and plot the survival object.

type

either surv (the default) or prob, depending on whether you want to plot survival from the start or conditional probabilities.

join_col, join_pch, join_size

graphical parameters for points marking points at which different survival functions are joined.

...

additional arguments to pass to ggplot2 functions.

Details

The function currently only highlights join points that are at the top level; that is, for objects with class surv_projection.

To avoid plotting the join points, set join_size to a negative number.

Value

a ggplot2::ggplot() object.


heemod documentation built on July 26, 2023, 5:45 p.m.