4
$\begingroup$

I'm really new to stats and R and I suspect I'm missing something obvious. I have a set of memberships all who start after a point in time (six months ago). I have done my query to estimate the number of days in the membership to today marking those still ongoing as censored. I've done my plot from the data so the max number is 180 days and the survival rate drops to zero for 180 days. Is this the best way to look at this data. I'm a bit unsure of the best approach. It's Kaplan's survival algorithm. Given that a lot of the memberships are ongoing/censored should the probability for 180 days be zero.

$\endgroup$
  • $\begingroup$ This very much looks like a duplicate of this question: stats.stackexchange.com/questions/106027/…. $\endgroup$ – Alexis Jul 13 '14 at 20:15
  • $\begingroup$ It is similar but I'm not sure I understand the answer. Should the probability drop to zero at 180 days given that no one will have a membership of more than 180 days but also there will be a lot of people with a membership of less than 180 who are censored. $\endgroup$ – Chris Jul 13 '14 at 20:32
  • $\begingroup$ Reread the last paragraph of my answer. Also: the appropriate place to ask for clarifications is in a comment, not in a new question. $\endgroup$ – Alexis Jul 13 '14 at 20:38
  • $\begingroup$ Sorry I'm new to this. But I'm a different person I'm not reasking the question again. From your comment are you saying that if I have 10% of people who start on day 10 survive for 170 days and are then censored should that mean the survival curve shouldn't be zero? I'm a bit unsure what the curve should look like. Would you rather I ask this in the other question? $\endgroup$ – Chris Jul 13 '14 at 20:48
  • $\begingroup$ @Alexis,No, i disagreethis is not a duplicate question. , can you clarify where in your previous answer address the question of probability of survival curve dropping to zero? In addition, this question is about subscribers the other was about patients both have different dynamics even though they use Kaplan Meir survival analysis $\endgroup$ – forecaster Jul 13 '14 at 20:51
4
$\begingroup$

This happens when you have event happening after your constant censoring time. Suppose you have censoring for everyone at 100 days, and there is one event recorded at 100.01 days (this is where you check your database for correctness).

The following code illustrate this problem:

library(survival)
time<-c(5,10,15,20,100,100,100,100,100,100)
events<-c(1,1,1,1,0,0,0,0,0,0)

fit1<-survfit(Surv(time, events)~ 1, type='kaplan-meier', conf.type='none')
plot(fit1, xlab="Time",main="Scenario 1 without one event right after 100 days")

time2<-c(5,10,15,20,100,100,100,100,100,100.1)
events2<-c(1,1,1,1,0,0,0,0,0,1)
fit2<-survfit(Surv(time2, events2)~ 1, type='kaplan-meier', conf.type='none')
plot(fit2, xlab="Time", main="Scenario 2 with one event right after 100 days")

Notice in the second scenario, I created an event at time 100.1. And here is the resulting figures for the two scenario (one normal, one having an event after 100 days)

enter image description here enter image description here

Therefore, I suggest you check your data to see if indeed it is the case that you have events happening right after the common censoring time.

$\endgroup$
  • $\begingroup$ +1. Nice answer with a good example. I like the bit about "this is where you check your database for correctness." $\endgroup$ – Placidia Mar 20 '17 at 14:06
0
$\begingroup$

If the last observation is an event and all censoring have happened before the last observation, the KM curve would also drop to zero, c.f. Scenario 1a:

library(survival)

time<-c(5,10,15,20,50,60,70,80,90,100)
events<-c(1,1,1,1,0,0,0,0,0,1)

fit1<-survfit(Surv(time, events)~ 1, type='kaplan-meier')
plot(fit1, xlab="Time",main="Scenario 1a without one event right after 100 days,\nbut one event at the 100th day,
     and all censoring happened before the 100th day", conf.int=FALSE, mark.time=TRUE)

A KM-curve that drops to zero don't need to be a database error.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.