Re: [R] Kaplan-Meier plot

2019-01-17 Thread Marc Schwartz via R-help
Hi, Just to emphasize Bert's e-mail with a hint, the 'mark.time' argument for plot.survfit() is FALSE by default. Regards, Marc Schwartz > On Jan 17, 2019, at 2:45 PM, Bert Gunter wrote: > > Have you consulted ?plot.survfit ? There are examples for KM plots there. > > Also, obvious questio

Re: [R] Kaplan-Meier plot

2019-01-17 Thread Bert Gunter
Have you consulted ?plot.survfit ? There are examples for KM plots there. Also, obvious question: Have you specfied the censoring properly in your data and fit? Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley

[R] Kaplan-Meier plot

2019-01-17 Thread Medic
According to the guidelines (if I'm not mistaken), the code below is sufficient (without any specification) to give Kaplan-Meier curves with censored data markings on Kaplan-Meier curves. But in my case censored data don't appears on the curves?! library(survival) mydata<-read.csv (file="C:/mydata

Re: [R] Kaplan-Meier Plot

2009-01-15 Thread John Lande
thank you, it worked properly. On Thu, Jan 15, 2009 at 4:53 AM, Marc Schwartz wrote: > on 01/14/2009 03:32 PM John Lande wrote: > > dear all, > > > > I want to plot a kaplan Meier plot with the following functions, but I > fail > > to produce the plot I want: > > > > library(survival) > > tim <-

Re: [R] Kaplan-Meier Plot

2009-01-14 Thread Marc Schwartz
on 01/14/2009 03:32 PM John Lande wrote: > dear all, > > I want to plot a kaplan Meier plot with the following functions, but I fail > to produce the plot I want: > > library(survival) > tim <- (1:50)/6 > ind <- runif(50) > ind[ind > 0.5] <- 1; ind[ind < 0.5] <- 0; > MS <- runif(50) > pred <- vec

[R] Kaplan-Meier Plot

2009-01-14 Thread John Lande
dear all, I want to plot a kaplan Meier plot with the following functions, but I fail to produce the plot I want: library(survival) tim <- (1:50)/6 ind <- runif(50) ind[ind > 0.5] <- 1; ind[ind < 0.5] <- 0; MS <- runif(50) pred <- vector() pred[MS < 0.3] <- 0; pred[MS >= 0.3] <- 1 df <- as.data.f

[R] Kaplan-Meier Plot

2009-01-14 Thread John Lande
dear all, I want to plot a kaplan Meier plot with the following functions, but I fail to produce the plot I want: library(survival) tim <- (1:50)/6 ind <- runif(50) ind[ind > 0.5] <- 1; ind[ind < 0.5] <- 0; MS <- runif(50) pred <- vector() pred[MS < 0.3] <- 0; pred[MS >= 0.3] <- 1 df <- as.data.f