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)
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
.