0

There are solutions to extract these values in the packages pROC and ROCR, but I don't know how to do the same with the Epi package.

Here is the example I'm trying to work through:

library(pROC)
library(Epi)
data(aSAH)
ROC(form = outcome ~ s100b, data=aSAH, plot = "ROC", MX = T)

enter image description here

I tried the following:

    rc <- ROC(form = outcome ~ s100b, data=aSAH, plot="sp" )
    rc$lr$weights
    str(rc$lr$weights)
 Named num [1:113] 0.185 0.19 0.171 0.143 0.185 ...
 - attr(*, "names")= chr [1:113] "29" "30" "31" "32" ..

which could be correct because the documentation for the package links weights to the model matrix, but I am not sure, especially because he weights seem to start at 29.

Community
  • 1
  • 1
Antoni Parellada
  • 4,253
  • 6
  • 49
  • 114
  • So why don't you use ROCR or pROC? Are they missing something else? – Calimo Feb 20 '16 at 08:21
  • I am trying to sort out if the value of the predictor variable that I calculate for `lr.eta` manually corresponds to one of the threshold values that R used to calculate the ROC within the Epi package. You can see my manual calculations [here](http://rinterested.github.io/statistics/roc.html). – Antoni Parellada Feb 20 '16 at 15:59

0 Answers0