Message-ID: <Pine.A41.4.44.0205021145550.27118-100000@homer36.u.washington.edu>
Date: 2002-05-02T18:48:19Z
From: Thomas Lumley
Subject: plot survival points
In-Reply-To: <200205021821.g42ILdx05352@apicot.dba.ufv.br>
On Thu, 2 May 2002, Ronaldo Reis Jr. wrote:
>
> Hi Thomas
> I try it, but the graphic make is not a point graphic, is a ?scale? plot,
> like this:
>
> |_
> | |_
> | |
> | |__
> | |_
> | |_
> |_____________
>
> I need the same graphic, but with point like this:
>
> |
> | *
> | *
> | *
> | *
> | *
> |____________
>
Here's an example of superimposing points on lines for two groups
library(survival)
data(aml)
#fitted exponential models
curve(1-pexp(x,rate=0.04314),col="green",from=0,to=150)
curve(1-pexp(x,rate=0.01655),col="blue",from=0,to=150,add=TRUE)
fit <- survfit(Surv(time, status) ~ x, data = aml)
points(fit[1],col="blue")
points(fit[2],col="green")
-thomas
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._