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]]

