Displays the observed Kaplan-Meier, expected and relative survival curves
survexp_plot(
futime,
status,
age,
sex,
entry_date,
ratetable = survexp.fr::survexp.fr,
main = "Observed and expected survival",
xlab = "Time (years)",
ylab = "Survival",
col.km = "black",
lwd.km = 2,
lty.km = 1,
conf.int.km = TRUE,
col.exp = "blue",
lwd.exp = 2,
lty.exp = 1,
main.rel = "Relative survival",
ylab.rel = "Relative survival",
col.rel = "black",
lwd.rel = 2,
lty.rel = 1,
times = seq(0, max(futime, na.rm = TRUE)/365.241, length = 6)[-1],
alpha = 0.05,
xscale = 365.241,
...
)
A matrix containing the values of relative survivals and their confidence intervals for each time of times
follow-up time of the subjects in days
0 if censored or 1 if dead at futime
age in days
"male"
or "female"
entry date in the study
a table of event rates, such as survexp.fr
or survexp.us
main title of the Kaplan-Meier and expected survivals plot
x-label of the plot
y-label of the plot
color of the observed survival curve
line width of the observed survival curve
line type of the observed survival curve
TRUE
to display the confidence interval of the observed survival
color of the expected survival curve
line width of the expected survival curve
line type of the expected survival curve
main title of the relative survival plot
y-label of the relative survival plot
color of the relative survival curve
line width of the relative survival curve
line type of the relative survival curve
times to draw the confidence intervals of the relative survival
determines the confidence level (1-alpha
) of the confidence intervals for the relative survival
see the xscale
argument in plot.survfit
other arguments to be passed in plot.survfit
Hugo Varet
This function displays the observed and expected survivals, and the relative survival which is defined as: $$r(t) = exp(-exp(\beta) \times t)$$ where \(exp(\beta)\) is the excess risk by time unit estimated by an additive Poisson model.
M. Pohar and J. Stare, Making relative survival analysis relatively easy, Computers in Biology and Medicine, 2007
M. Pohar and J. Stare, Relative survival analysis in R, Computers Methods and Programs in Biomedicine, 2006
attach(data.example)
survexp_plot(futime, status, age, sex, entry_date)
Run the code above in your browser using DataLab