plotSurv function

Plot Survival Curves (or Cumulative Hazard Function) and their difference

Plot Survival Curves (or Cumulative Hazard Function) and their difference

Plot the survival curves (or cumulative hazard) and their difference for objects returned by function survCurve or survDiff. By using ggplot2 plotting system, the plots generated are able to be further customized properly.

plotSurv( object, legendName = "", conf.int = FALSE, smooth = FALSE, lty, col, ... )

Arguments

  • object: An object returned by function survCurve or survDiff.
  • legendName: An optional name for the figure legend.
  • conf.int: A logical value indicating whether to plot the credible interval(s).
  • smooth: A logical value, default FALSE. If TRUE, plot the coefficients as smooth lines; otherwise, plot the coefficients as piece-wise constant step functions.
  • lty: An optional numeric vector indicating line types specified to different groups: 0 = blank, 1 = solid, 2 = dashed, 3 = dotted, 4 = dotdash, 5 = longdash, 6 = twodash.
  • col: An optional character or numeric vector indicating line colors specified to different groups.
  • ...: Other arguments for future usage.

Returns

A ggplot object.

Examples

## See the examples in bayesCox.

See Also

bayesCox, survCurve, and survDiff.

  • Maintainer: Wenjie Wang
  • License: GPL (>= 3)
  • Last published: 2024-07-08