This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Concordance index (c-index) for censored survival data returned NA

I am using R package 'survcomp' to calculate the c-index of predicted survival vs. known test set survival. But it returned NA as result. Data are as following:

Test set known survival:

     OS.Time    OS.event
1   1686    0
2    517    0
3    7    0
4    1965    0
5    5748    0
6    495    0
7    10    0
8    365    1
9    1733    0

Predicted survival (may not be a good estimate, but should not affect c-index calculation anyhow):

0.11946905 0.27748710 0.88212024 0.19557143 0.09421667 0.27926806 1.53901710 1.03344646 0.73955159

The R code used to calculate c-index is: concordance.index(pred, test_surv$OS.Time, test_surv$OS.event, method="noether")$c.index. As said, NA returned.

Is this because there is only one event in the test set? But I checked the c-index calculation formula: LaTeX: CI=\frac{1}{\frac{n(n-1)}{2}-#censored\;pairs}\sum\limits_{i<j}h(i,j).

It seems only when the denominator is 0, the c-index can be NA, but it is not the case above.

statistical survcomp r survival

I don't know the real reason, but it is definitely not because there is only one event in the test set. For e.g. if you change the test_surv like this,

  OS.Time OS.event
1    1686        0
2     517        0
3       7        1
4    1965        0
5    5748        0
6     495        0
7      10        0
8     365        0
9    1733        0

It gives you a concordance index of 0.75.

0 answers

No answers yet.

Log in to answer this question.