[R] creating log-log survival plots that are not inverted
Bob Green
bgreen at dyson.brisnet.org.au
Sat Feb 28 23:48:35 CET 2009
I am hoping for some advice regarding how to obtain a log-log
survival plot that is not in the inverse. On page 128 of Modelling
survival data by Therneau & Grambsch there is the an example of the
type of desired plot, with a log of the survival curve by
years. Marc Schwartz has provided me with some reproducible code.
The code below produces inverted plots.
library(surv2sample)
data(gastric)
fit <- survfit ( Surv(time, event) ~ treatment, data = gastric)
#Default plot:
plot(fit)
plot(fit, fun = "cloglog")
library(Design)
survplot(fit, loglog = TRUE, conf = "none")
Any assistance is much appreciated,
regards
Bob
More information about the R-help
mailing list