KM.plot {risksetROC} | R Documentation |
Incident/Dynamic (I/D) ROC curve, AUC and integrated AUC (iAUC) estimation of censored survival data
Description
This function creates Kaplan-Meier plot.
Usage
KM.plot(Stime, survival, max.T=NULL, lty=NULL, all=TRUE, ...)
Arguments
Stime |
unique ordered event times |
survival |
estimates of survival probabilities at Stime |
max.T |
maximum time to be considered for plotting, default is NULL which plots survival till max(Stime)+1 units |
lty |
line type |
all |
TRUE or FALSE, default is TRUE |
... |
additional plot arguments |
Details
This function creates Kaplan-Meier plot. If all=TRUE, then this creates a new plot. If all=FALSE, it adds line to an existing plot and hence must be called after a plot() or similar call.
Author(s)
Patrick J. Heagerty
References
Heagerty, P.J., Zheng Y. (2005) Survival Model Predictive Accuracy and ROC curves Biometrics, 61, 92 – 105
Examples
data(pbc)
## considering only randomized patients
pbc1 <- pbc[1:312,]
## create new censoring variable combine 0,1 as 0, 2 as 1
survival.status <- ifelse( pbc1$status==2, 1, 0)
survival.time <- pbc1$fudays
kout <- weightedKM(Stime=survival.time, status=survival.status)
KM.plot(kout$time,kout$survival)
[Package risksetROC version 1.0.4.1 Index]