What is the idea of having a stratified concordance (C-index) in survival::survConcordance, as opposed to computing the concordance over all samples ignoring the strata?
Can there be some inflation of the C-index if the strata themselves are predictive of time to outcome? (some sort of confounding)
[edit: to clarify, the non-stratified index computes the ranking of all pairs of individuals regardless of sex, the stratified index only compares males to males and females to females and then combines the estimates]
Here's some example code based on rms::rcorr.cens example where survival time is driven by age in males but not in females, which shows a big difference in the C-index between computing it on all samples versus computing it within strata (sex) and then combining into one estimate:
library(survival)
set.seed(123)
n <- 400
age <- rnorm(n, 50, 20)
sex <- sample(c("M", "F"), length(age), replace=TRUE, prob=c(0.7, 0.3))
d.time <- rexp(length(age), ifelse(sex == "M", age, 1)) * 1e2
cens <- runif(length(age), 15, 30)
death <- d.time <= cens
d.time <- pmin(d.time, cens)
d <- data.frame(age=age, time=d.time, sex=sex, death=death)
s1 <- with(d, survConcordance(Surv(time, death) ~ age))
s2 <- with(d, survConcordance(Surv(time, death) ~ age + strata(sex)))
> s1
Call:
survConcordance(formula = Surv(time, death) ~ age)
n= 400
Concordance= 0.5420224 se= 0.01769964
concordant discordant tied.risk tied.time std(c-d)
40572.000 34281.000 0.000 0.000 2649.742
> s2
Call:
survConcordance(formula = Surv(time, death) ~ age + strata(sex))
n= 400
Concordance= 0.6121132 se= 0.02236015
concordant discordant tied.risk tied.time std(c-d)
sex=F 1058 1297 0 0 290.0925
sex=M 24461 14874 0 0 1574.2970