On Mon, 2006-06-05 at 18:54 -0400, Barker, Chris [SCIUS] wrote: > Its probably easiest/fastest for you either to subset your dataset > first, or else simply use the subset option in survfit() > > e.g. > > survfit( ) has a subset option, > survfit( Surv( , ) ~ physician , subset=='Jones") > Chris,
Thank you very much for your kind reply. Using subset worked. I had to modify the syntax a little from what you posted: survfit(Surv(days,status==1)~Physician,subset(viatorr,viatorr[6]=="Pierce") where viatorr is the name of my data set. Applying plot to the function above generated a survival curve for my patients. I was also able to plot survival curves for other physicians as well. This is great! ______________________________________________ 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