[R] Plotting K-M Curve when have several strata
Ko-Kang Kevin Wang
kwan022 at stat.auckland.ac.nz
Wed Mar 26 13:13:57 CET 2003
Hi,
If I have:
foo <- survfit(y ~ x)
where y is a survival object and x is a n-level factor. The documentation
says when I plot(foo), the confidence intervals will not be plotted (which
I guess is understandable as otherwise the plot will get really messy).
I tried to plot with confidence intervals by using:
plot(foo, conf.int = TRUE)
and indeed the resulting plot is messy. However I'm just wondering if I
can (suppose x is a 2-level factor) use different colours and line types
for the confidence lines? If I do:
plot(foo, conf.int = TRUE, col = 1:2)
then I'll get two different colours. What I would like is to then plot
the confidence lines using lty = 2 (while keeping the colour).
Can I do this?
--
Cheers,
Kevin
------------------------------------------------------------------------------
/* Time is the greatest teacher, unfortunately it kills its students */
--
Ko-Kang Kevin Wang
Master of Science (MSc) Student
SLC Tutor and Lab Demonstrator
Department of Statistics
University of Auckland
New Zealand
Homepage: http://www.stat.auckland.ac.nz/~kwan022
Ph: 373-7599
x88475 (City)
x88480 (Tamaki)
More information about the R-help
mailing list