rpietro / NSQIPageComplications

Analysis of surgical complications using the NSQIP data set
1 stars 1 forks source link

c-statistic #7

Closed mworni closed 12 years ago

mworni commented 12 years ago

how to get a nice c-statistic using R?

rpietro commented 12 years ago

sorry, forgot this one. c statistic is the area under the curve, which you can get with the lroc function. 0.5 means that the model is horrid (no discrimination), 1 means a perfect model

here is an example with a c statistic for a simple model with a value of of 0.519679

library(epicalc) test <- glm(postopdeath ~ femalesex,family=binomial(link="logit")) lroc(test) $model.description [1] "postopdeath ~ femalesex"

$auc [1] 0.519679

$predicted.table predicted.prob Non-diseased Diseased 0.0280 48494 1400 0.0326 49016 1657

$diagnostic.table 1-Specificity Sensitivity 1.0000000 1.0000000

 0.5026766   0.5420347
 0.0000000   0.0000000

On Sun, Jun 24, 2012 at 10:38 AM, mworni < reply@reply.github.com

wrote:

how to get a nice c-statistic using R?


Reply to this email directly or view it on GitHub: https://github.com/rpietro/NSQIPageComplications/issues/7

rpietro commented 12 years ago

posted something at http://goo.gl/1MXJo that might be of interest. please post separate issues if you would like to discuss their code