Skip to contents

This function allows to create a KM survival curve overall or splitted by a categorical variable

Usage

KM_LB(
  Event = "OS_EVENT",
  tEvent = "OS",
  strata = 1,
  data = data,
  title = "Prova",
  xlab = "Time in months",
  ylab = "Probaility of Surv",
  xlim = c(0, max(data[, tEvent], na.rm = T)),
  breaks_by = 3
)

Arguments

Event

Event variable

tEvent

Survival Time Variable

strata

Variable to stratify (Default = 1)

data

dataframe

title

Graph title (Default = "Prova")

xlab

x-axis title (Default = "Time in months")

ylab

y-axis title (Default = "Probaility of Surv")

xlim

limits of x-axis (Default is from 0 to maximum observed time)

breaks_by

breaks of risk table(Default = 3)

Value

a KM graph