Skip to content
Prev 19441 / 398500 Next

plot survival points

On Thu, 2 May 2002, Ronaldo Reis Jr. wrote:
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._