2
$\begingroup$

So I have a simple test dataset in R of (possibly right censored) survival times, and a vector indicating which times are censored (0) and which are survival times(1). I want to estimate the median survival time of this dataset with upper and lower 95% confidence bounds with the survfit function. This is my code in R:


times = c(23,47,69,70,71,100,101,148,181,198,208,212,224)

censor = c(1,1,1,0,0,0,0,1,1,0,0,0,0)

result = survfit(Surv(times,censor) ~ 1)


However this gives the following output:

enter image description here

So both the median and the upper confidence bounds come out as NA values. Is there any way I can resolve this so that I can estimate the mean survival time with confidence bounds?

$\endgroup$

1 Answer 1

0
$\begingroup$

This happens if the Kaplan-Meier survival curve hasn't gotten below the survival probability of 0.5, for the median itself, or far enough below that to get both confidence limits within the range of observed events. Look like your data haven't yet reached a median survival.

Unless you use a parametric survival model, with its potential limitations in terms of extrapolating out in time beyond the last event, you need to use some other measure like time to 80% survival--some survival percentage for which you actually have data in your Kaplan-Meier plot.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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