4
$\begingroup$

I have been working on fitting Cox model for prediction by using the rms package. I want to measure model calibration and discrimination. Discrimination was measured by using rms::validate(); Dxy can be transferred to @Frank Harrell's $c$ index. But in this way, I cannot get 95% CI for the $c$ index. How can I do this in R? And by the way, what value should be in $c$ index to present the model's well?

Calibration was done using rms::calibrate(), but I cannot get the calibration plot which presented concordance of predicted and observed events in Cox model. How can I do this calibration plot of Cox model in R or SAS.

$\endgroup$
1
  • 1
    $\begingroup$ Note that if you ever need to do out-of-sample (external) validation, the rcorr.cens function in the R Hmisc package provides the standard error of Somers' $D_{xy}$ which gives rise to a confidence interval that can be translated to an interval for $c$. But for internal validation we don't at present have a standard error for $D_{xy}$. $\endgroup$ Apr 29 '12 at 12:26
3
$\begingroup$

Using R:

library(rms)   
x <- cph(Surv(time, event) ~ pred 1 + pred2, x=TRUE, y=TRUE, 
         surv=TRUE, time.inc =1, dxy = TRUE, data = dataname)    
c1 <- calibrate(x, u=1)    
plot(c1)
$\endgroup$
1
  • 5
    $\begingroup$ It would be great if you could comment on your code, for future readers or people not used to R. $\endgroup$
    – chl
    Mar 28 '12 at 21:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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