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