Kaplan Meier curve
1
0
Entering edit mode
wenhuo hu ▴ 200
@wenhuo-hu-5208
Last seen 6.5 years ago
United States
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="">
Survival Survival • 2.0k views
ADD COMMENT
0
Entering edit mode
Heidi Dvinge ★ 2.0k
@heidi-dvinge-2195
Last seen 10.3 years ago
Hi Wenhuo, > 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 > I think there might be a slight problem with your data here, more specifically the "days" column. The 12th data point looks like it's formatted differently than the others (a space after it). That might give rise to the one alive mouse showing up as a cross at ~day 100. Incidentally, something like this looks right: d <- data.frame(gene=c(1,1,1,2,2,1,2,1,2,1,2,1,2), status=c(1,1,1,1,1,0,1,0,1,0,0,0,1), days=c(81,119,92,19,15,41,16,41,21,41,41,41,31)) survfit(Surv(days, status)~gene, data=d) -> fit plot(fit, conf.int=F, col=2:3, lty=1:2) That gives 8 deaths in total, and 5 alive mice (plotted on top of each other at day41). HTH \Heidi > 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 > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT
0
Entering edit mode
Thank Susan and Heidi for your help. The space in the data were introduced by mistake when I trying to give a simple example of my data. Sorry for this. I got the points to interpretate such data. This is the best way to present observations of partially alive, since we don't know when and by what they will die. Really appreciate it. Wenhuo On Jun 26, 2012 3:57 AM, "Heidi Dvinge" <heidi@ebi.ac.uk> wrote: > Hi Wenhuo, > > > 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 > > > I think there might be a slight problem with your data here, more > specifically the "days" column. The 12th data point looks like it's > formatted differently than the others (a space after it). That might give > rise to the one alive mouse showing up as a cross at ~day 100. > > Incidentally, something like this looks right: > > d <- data.frame(gene=c(1,1,1,2,2,1,2,1,2,1,2,1,2), > status=c(1,1,1,1,1,0,1,0,1,0,0,0,1), > days=c(81,119,92,19,15,41,16,41,21,41,41,41,31)) > survfit(Surv(days, status)~gene, data=d) -> fit > plot(fit, conf.int=F, col=2:3, lty=1:2) > > That gives 8 deaths in total, and 5 alive mice (plotted on top of each > other at day41). > > HTH > \Heidi > > > > 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 > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor@r-project.org > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > Search the archives: > > http://news.gmane.org/gmane.science.biology.informatics.conductor > > > [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

Traffic: 758 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6