# Survival Analysis why does probability drop to zero

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.

• This very much looks like a duplicate of this question: stats.stackexchange.com/questions/106027/…. – Alexis Jul 13 '14 at 20:15
• 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. – Chris Jul 13 '14 at 20:32
• Reread the last paragraph of my answer. Also: the appropriate place to ask for clarifications is in a comment, not in a new question. – Alexis Jul 13 '14 at 20:38
• 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? – Chris Jul 13 '14 at 20:48
• @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 – forecaster Jul 13 '14 at 20:51

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)

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.

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

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.