km | R Documentation |
Kaplan-Meier with robust standard errors Robust variance is default variance and obtained from the predict call
km(formula, data = data, ...)
formula |
formula with 'Surv' 'Event' outcome |
data |
data frame |
... |
Additional arguments to phreg |
Thomas Scheike
library(mets)
data(sTRACE)
sTRACE$cluster <- sample(1:100,500,replace=TRUE)
out1 <- km(Surv(time,status==9)~strata(vf,chf),data=sTRACE)
out2 <- km(Surv(time,status==9)~strata(vf,chf)+cluster(cluster),data=sTRACE)
summary(out1,times=1:3)
summary(out2,times=1:3)
par(mfrow=c(1,2))
plot(out1,se=TRUE)
plot(out2,se=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.