C.H. wrote:
Dear experts,
I would like to know how to plot the log-minus-log plot for survival
analysis (to check the proportional assumption) in R.
Using the AML example.
fit <- survfit(Surv(time, status) ~ x, data=aml)
length(fit$surv) #20
as the length of fit$surv is shorter than aml$x and aml$time. I don't
know how to plot.
Thank you.
Regards,
CH
library(Design) # uses library(survival)
fit <- survfit(. . .)
survplot(fit, loglog=TRUE)
?survplot for details
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.