Plot general survival models

# S3 method for 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.

Value

a ggplot2::ggplot() object.

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.