[R] Selective Survival Statistics with R
Gregory Pierce
pierce.gregory at gmail.com
Tue Jun 6 01:51:51 CEST 2006
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!
More information about the R-help
mailing list