km_plot_fancy: Title a fancy KM curve plot with p-value in the plot

Description Usage Arguments Value

View source: R/functions.R

Description

Title a fancy KM curve plot with p-value in the plot

Usage

1
2
3
4
5
km_plot_fancy(model.formula = survfit(Surv(time, status) ~ trt, data =
  veteran), pvalue.TF = TRUE, conf.int.TF = TRUE,
  x.lab = "Time in Days", x.interval = 200, risk.table.style = "abs",
  n.censor.plot.TF = TRUE, surv.median.line.style = "hv",
  legend = c("group 1", "group 2"))

Arguments

model.formula

the survival formula

pvalue.TF

whether showing the p-value or not

conf.int.TF

whether showing the confidence interval or not

x.lab

the label of x-axis

x.interval

the break of x-axis

risk.table.style

c('absolute', 'percentage','abs_pct') show both absolute number or/and percentage of individuals at risk

n.censor.plot.TF

to plot the number of censored subjects at time t. As suggested by Marcin Kosinski, This is a good additional feedback to survival curves, so that one could realize: how do survival curves look like, what is the number of risk set AND what is the cause that the risk set become smaller: is it caused by events or by censored events?

surv.median.line.style

horizontal/vertical line at median survival using the argument surv.median.line. Allowed values include one of c(“none”, “hv”, “h”, “v”). v: vertical, h:horizontal.

legend

to change the legend labels.

Value

a km plot


LittleBeannie/demo documentation built on Aug. 12, 2020, 8:17 p.m.