C-index for each treatment arm with variable-treatment interaction

94 views Asked by At

I have difficulty calculating the C-index (UnoC with survAUC R package) for each treatment arm to assess the variable-treatment interaction.

I have a database with 4 explanatory variables X1, X2, X3, X4, as follows:

> str(data)
'data.frame':   1000 obs. of  7 variables:
 $ X1  : num  -0.578 0.351 0.759 -0.858 -1.022 ...
 $ X2  : num  -0.7897 0.0339 -1.608 -1.1642 -0.0787 ...
 $ X3  : num  -0.1561 -0.7147 -0.8229 -0.1519 -0.0318 ...
 $ X4  : num  1.4161 -0.0688 -0.155 -0.1571 -0.649 ...
 $ TRT : num  0 0 0 0 0 0 0 1 0 1 ...
 $ time: num  6.52 2.15 3 1.31 1.56 ...
 $ stat: num  1 1 1 1 1 1 1 1 1 1 ...

The variable X4 interacts with the treatment variable and I don't have censored data.

I would like to calculate the C-index (UnoC) for each treatment arm. I expect the C-index to be equal to 0.5 in the control arm and much higher in the experimental arm. But, I get almost the same value for both arms!

Can anyone confirm that: if I have a strong interaction between a variable and the treatment, the C-index in the experimental arm is high and in the control arm = 0.5?

Here is my attempt:

TR <- data[1:500,]
TE <- data[501:1000,]

s <- Surv(TR$time, TR$stat)
sNew <- Surv(TE$time, TE$stat)

train.fit  <- coxph(Surv(time, stat) ~ X4, data=TR)
lpnew <- predict(train.fit, newdata=TE)

# The C-index for each treatment arm
UnoC(Surv.rsp = s[TR$TRT == 1], Surv.rsp.new = sNew[TE$TRT == 1], lpnew = lpnew[TE$TRT == 1])
[1] 0.7577109
UnoC(Surv.rsp = s[TR$TRT == 0], Surv.rsp.new = sNew[TE$TRT == 0], lpnew = -lpnew[TE$TRT == 0])
[1] 0.7295202

Thank you for your Help

0

There are 0 answers