0

Good morning,

I started using R only two months ago, so I still have little experience. I'm sorry if I can´t explain it properly.

I'm having trouble with a complex sample design.

I can't find how to do a confidence interval for weighted auc.

Initially I couldn't do the ROC curve, but then I found this post: How to make ROC Curves with survey objects

And then I found how to do the AUC in this one: https://rdrr.io/cran/WeightedROC/f/inst/doc/Definition.pdf#:~:text=weighted%20ROC%20curve%20is%20drawn%20by%20plotting%20FPR%28%1C%29,1%29%20w%20%3C-%20c%281%2C%201%2C%201%2C%204%2C%205%29

My data can't be shared so there isn't a real example.

Using the example from the link above for the roc curve, I basically did this with my data:

Model3 = svyglm(factor(score) ~ factor(BMI), family=quasibinomial, psurvey)

summary(Model3)

wg <- WeightedROC(fitted(Model3), Model3$y, weights(psurvey))

library(ggplot2)

ggplot() + geom_path(aes(FPR, TPR), data=wg) + coord_equal()

WeightedAUC(wg)

I have tried to search how to calcule the confidence interval for the weighted auc and the cut-off value, but I can´t find it.

Does anyone know the code?

Thank you very much.

M Santos
  • 1
  • 1

0 Answers0