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
David Winsemius
2009-Mar-01 04:09 UTC
[R] creating log-log survival plots that are not inverted
I think what you want may be produced by this code for InvNormal(S) vs log(time): survplot(fit, fun=qnorm, logT=T, conf = "none") That is not what you describe, however. I am worried about the plot on the page you cite, because it is not similar to other log(-log(S)) (complementary log-log) plots I am familiar with. I checked the errata listing and do not see a correction, but I am still concerned it might not be not a log(- log(S)) vs time plot. Terry Therneau has always been very helpful to readers of this group and I suspect he can clarify any confusion I may be laboring under. -- David Winsemius Heritage Laboratories On Feb 28, 2009, at 5:48 PM, Bob Green wrote:> 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 > > ______________________________________________ > R-help at 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.