Yes. Thank you. Worked Brilliantly.
Here it is for any future reference:
for(i in
1:10)plot(survfit(Surv(time,death==1)~group)[i],xlab="days",main=levels(group)[i])
On 12/18/06, Thomas Lumley <[EMAIL PROTECTED]> wrote:
>
> On Mon, 18 Dec 2006, Farrel Buchinsky wrote:
>
> > Using the survival library, it is possible to get a plot of all the
> subjects
> > in a sample and it is possible to get a plot of all subgroups in the
> same
> > plot. How does one get a separate plot for each subgroup?
>
> There is an example in ?survfit of how to plot a single subgroup, and you
> can just wrap it in a loop to plot all the subgroups.
>
> -thomas
>
>
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.