[R] How to calculate confidence interval of C statistic by rcorr.cens

From: <khosoda_at_med.kobe-u.ac.jp>
Date: Sun, 22 May 2011 17:11:40 +0900


I'm trying to calculate 95% confidence interval of C statistic of logistic regression model using rcorr.cens in rms package. I wrote a brief function for this purpose as the followings;

CstatisticCI <- function(x) # x is object of rcorr.cens.   {
    se <- x["S.D."]/sqrt(x["n"])
    Low95 <- x["C Index"] - 1.96*se
    Upper95 <- x["C Index"] + 1.96*se
    cbind(x["C Index"], Low95, Upper95)



> MyModel.lrm.rcorr <- rcorr.cens(x=predict(MyModel.lrm), S=df$outcome)
> MyModel.lrm.rcorr

       C Index            Dxy           S.D.              n
missing     uncensored
     0.8222785      0.6445570      0.1047916    104.0000000
0.0000000    104.0000000
Relevant Pairs     Concordant      Uncertain
  3950.0000000   3248.0000000      0.0000000

> CstatisticCI(x5factor_final.lrm.pen.rcorr)
Low95 Upper95

C Index 0.8222785 0.8021382 0.8424188

I'm not sure what "S.D." in object of rcorr.cens means. Is this standard deviation of "C Index" or standard deviation of "Dxy"? I thought it is standard deviation of "C Index". Therefore, I wrote the code above. Am I right?

I would appreciate any help in advance.

Kohkichi Hosoda M.D.

    Department of Neurosurgery,
    Kobe University Graduate School of Medicine,

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sun 22 May 2011 - 08:15:15 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 22 May 2011 - 15:00:09 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive