[BioC] Kaplan Meier curve

wenhuo hu huwenhuo at gmail.com
Tue Jun 26 08:02:17 CEST 2012


Hi --

I am trying the survival package to draw kaplan meier curve but returned
with unexpected result.
here is my data: d, status: 1 mean died, 0 means still alive.

   gene status days
1    ko      1   81
2    ko      1  119
3    ko      1   92
4  ctrl      1   19
5  ctrl      1   15
6    ko      0   41
7  ctrl      1   16
8    ko      0   41
9  ctrl      1   21
10   ko      0   41
11 ctrl      0   41
12   ko      0  41
13 ctrl      1   31

survfit(Surv(days, status)~gene, data=d) -> fit
plot(fit, conf.int=F, col=2:3, lty=1:2)

as attached, the green one is ko genotype which can live longer. But there
should have alive mice left, 4 out of 7, as the data shows. Could any help
me on this point?



Wenhuo Hu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: survival.png
Type: image/png
Size: 7738 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/bioconductor/attachments/20120626/4bcd444f/attachment.png>


More information about the Bioconductor mailing list