[R] Survival Curves

robgriffin247 rg.rforum at hotmail.co.uk
Mon Apr 16 19:02:26 CEST 2012


actually, maybe I haven't quite solved this - the plot doesn't appear to
include the 23 that are still alive at the end.

I have tried using a status variable (1 or 0  dependant upon survival as in
page 800, roughly, in the R book) 
...
Call: survfit(formula = Surv(ssl$long, ssl$status) ~ ssl$sex)
23 observations deleted due to missingness 

(these 23 will be the 23 long - longevity - scores of NA)

and with the etype
(http://stat.ethz.ch/R-manual/R-devel/library/survival/html/survfit.formula.html)
and censor=T
(http://stat.ethz.ch/R-manual/R-devel/library/survival/html/survfit.coxph.html)
arguments but I can't seem to get them to work, maybe it's because its a
monday night, but I seem to have hit a dead end... bad times.


robgriffin247 wrote
> 
> Hi David thanks for the help, i was just looking back to say I have found
> my solution (i think) and as you suggested survfit was the way to go.
> 
> my solution was this:
> model<-survfit(Surv(a$long)~a$sex)
> plot(model,ylab="proportion alive",xlab="time (days)",col=c("red","blue"))
> 


--
View this message in context: http://r.789695.n4.nabble.com/Survival-Curves-tp4561685p4562155.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list