5
$\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$ Commented Apr 29, 2012 at 12:26

1 Answer 1

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
  • 6
    $\begingroup$ It would be great if you could comment on your code, for future readers or people not used to R. $\endgroup$ Commented Mar 28, 2012 at 21:46

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.