Re: [R] Cox model qustion in R

From: Chao Zhu <cznm4_at_mizzou.edu>
Date: Fri 01 Apr 2005 - 05:41:06 EST

> 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
>
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Apr 01 05:49:20 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:58 EST