View source: R/plots_efficacy.R
| plot_km | R Documentation |
Event-free curve with censoring ticks, dashed confidence limits, a log-rank p-value and the number at risk. Competing risks are not modelled.
plot_km(data, time, event, arm, xlab = "Time (months)",
ylab = "Event-free probability", title = "Kaplan-Meier estimate",
subtitle = NULL, conf_int = TRUE, risk_times = NULL, palette = NULL,
population = "Intent-to-treat population")
data |
Subject-level data. |
time, event, arm |
Column names. |
xlab, ylab, title, subtitle |
Labels. |
conf_int |
Draw pointwise confidence limits. |
risk_times |
Times for the number at risk. Default is |
palette |
Named color vector. |
population |
Analysis-population note printed in the caption. |
A ggplot object.
onc <- simulate_oncology(n_per_arm = 15)
plot_km(onc$adsl, time = "os_months", event = "os_event", arm = "arm")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.