survreg_plot function

Survival plot for a given survreg model with one binary covariate.

Survival plot for a given survreg model with one binary covariate.

Can be used on its own but is also useable as plotfun in node_pmterminal.

survreg_plot(mod, data = NULL, theme = theme_classic(), yrange = NULL)

Arguments

  • mod: A model of class survreg.
  • data: optional data frame. If NULL the data stored in mod is used.
  • theme: A ggplot2 theme.
  • yrange: Range of the y variable to be used for plotting. If NULL it will be 0 to max(y).

Examples

if(require("survival")) { survreg_plot(survreg(Surv(futime, fustat) ~ factor(rx), ovarian)) }
  • Maintainer: Heidi Seibold
  • License: GPL-2 | GPL-3
  • Last published: 2024-11-08

Useful links