plotSurv {dynsurv}R Documentation

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

Description

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.

Usage

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.

Value

A ggplot object.

See Also

bayesCox, survCurve, and survDiff.

Examples

## See the examples in bayesCox.


[Package dynsurv version 0.4-3 Index]