s-news
[Top] [All Lists]

Re: [S] Survival analysis : KM curve

To: s-news <s-news@wubios.wustl.edu>
Subject: Re: [S] Survival analysis : KM curve
From: "Paul Y. Peng" <ypeng@math.mun.ca>
Date: Mon, 28 Feb 2000 10:20:51 -0330
Organization: http://peng.web.com
References: <s8ba5bee.047@diogenes.hcuge.ch>
Sender: owner-s-news@wubios.wustl.edu
Cecile DELHUMEAU wrote:
> 
> I have a problem with a survival analysis ...
> 
> I have no problem to plot with Splus the KM risk (i.e., survival) but I dont 
> know how I can plot the KM risk (i.e., 1-survival)  ?
> 
> Here, there are what I do :
> 
> donnees<-read.table("surv.dat")
> azm<-donnees[,2]
> time<-donnees[,3]
> status<-donnees[,4]
> x<-survfit(Surv(time,status)~azm)
> motif()
> plot(x, lty = 1:2)
> 
> But I would like to have :
> 
> plot(1-x)
> 
> (that is not possible with 1-x ...)
> 
> How I can do it ???

plot(x, fun = "event") should do your job if you have a newer version
of S-PLUS (version 4.x or 5.x, I think). See the help page of
plot.survfit.

Paul.
-- 
______________________________________________________________
Paul Y. Peng, PhD                          http://peng.web.com
Assistant Professor of Statistics         Phone: (709) 7378080
Department of Mathematics and Statistics    Fax: (709) 7373010
Memorial University of Newfoundland
St. John's, NFLD A1C 5S7, Canada      Email: ypeng@math.mun.ca
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>