Skip to contents

Over the pairs whose order is known despite censoring, the proportion in which the subject failing first carried the higher predicted risk, ties counted as a half. 0.5 is chance.

Usage

morie_concordance_index(time, event, predicted_risk)

morie_survival_concordance(time, event, predicted_risk)

Arguments

time

follow-up times

event

1 for an event, 0 for censored

predicted_risk

predicted risk score, higher meaning sooner

Value

list with c_index and the pair counts

Examples

morie_concordance_index(time = c(1, 2, 3, 4, 5, 6, 7, 8), event = c(0, 1, 0, 1, 1, 0, 1, 0),
  predicted_risk = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $c_index
#> [1] 0
#> 
#> $concordant
#> [1] 0
#> 
#> $discordant
#> [1] 14
#> 
#> $tied
#> [1] 0
#> 
#> $n_pairs
#> [1] 14
#>