An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20050330/f163982a/attachment.pl
Cox model qustion in R
3 messages · Chao Zhu, Thomas Lumley
On Wed, 30 Mar 2005, Chao Zhu wrote:
But it only gives me the curve with combined treatment. How do I get a plot with two curves for different treatments. I don't want to do new<-data.frame(treat=c(0,1)) and plot(survfit(fit,newdata=new)) cause it gives you predicted curves for two treatments.
I think you are going to have to be clearer about what you want. If you want the Kaplan--Meier estimator for each treatment separately then plot(survfit(Surv(t)~treat)) will do it. Otherwise I don't know what you're trying to do. By the way, do you really have no censoring in the time variable? -thomas
----- Original Message ----- From: "Thomas Lumley" <tlumley at u.washington.edu> To: "Chao Zhu" <cznm4 at mizzou.edu> Cc: <r-help at stat.math.ethz.ch> Sent: Thursday, March 31, 2005 11:09 AM Subject: Re: [R] Cox model qustion in R
On Wed, 30 Mar 2005, Chao Zhu wrote:
But it only gives me the curve with combined treatment. How do I get a plot with two curves for different treatments. I don't want to do new<-data.frame(treat=c(0,1)) and plot(survfit(fit,newdata=new)) cause it gives you predicted curves for two treatments.
I think you are going to have to be clearer about what you want. If you want the Kaplan--Meier estimator for each treatment separately then plot(survfit(Surv(t)~treat)) will do it. Otherwise I don't know what you're trying to do. By the way, do you really have no censoring in the time variable? -thomas