Survival.plot {ComparisonSurv} | R Documentation |
Plot for Cumulative Survival Function
Description
A function used to plot the survival curves.
Usage
Survival.plot(time,status,group,...)
Arguments
time |
The follow up time for right censored data. |
status |
The status indicator, normally 1=event, 0=alive or right censored. |
group |
The group indicator for comparison, and the elements of this vector must take either 0 or 1. Normally, 0= control group, 1= treatment group. |
... |
Parameters in function plot() |
Value
None
Note
Survival.plot is based on the survival package, more details can be found in package "survival", the function of plot.survfit.
See Also
Examples
#get 'Crossdata' from package
data(Crossdata)
data1<-Crossdata
#
#get survival plot
Survival.plot(data1$time, data1$status, data1$group, xlab = "Time", ylab = "Survival"
, col = c(1, 4), lwd = c(3, 3), lty= c(1, 1))
legend(2.5, 1, c("group0", "group1"), col = c(1, 4), lwd = c(3, 3), lty= c(1, 1), bty="n")
[Package ComparisonSurv version 1.1.1 Index]