On Mon, 2006-06-05 at 17:04 -0700, Thomas Lumley wrote:
> On Mon, 5 Jun 2006, Gregory Pierce wrote:
> > 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.
> 
> An example of another approach is given in the example on the help page 
> for survfit
> 
> You could do
>    curves <- survfit(Surv(days,status==1)~Physician, data=viatorr)
>    plot(curves[1])
>    plot(curves[2])
> etc.
> 
>       -thomas

That also worked great! Thanks. This makes me very,very happy!!!!!!! I
can now go to our statistician without looking like a complete idiot and
I can get to work collecting survival data on our patients who had the
old-fashioned bare-metal Wallstent. Looking back in this way provides a
very interesting and humbling perspective.

Greg

______________________________________________
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

Reply via email to