Area under a ROC Curve after a logistic regression

I am trying to compute ROCAnalysis.jl package to compute the AUC value after a logistic regression. When I ran

auc(roc(dep, pred)),

where dep is the vector with original binary dependent variable and pred the predicted values from the logistic regression.

I get a value very different from the AUC value I get from Stata. I am wondering whether there is a good documentation on how to use these functions.

1 Like

The function seems to expect certain kind of scores for targets and non-targets, not truths and predictions. You can find other implementations in different packages. (General caution for beginners such as myself: it’s crucial to pay attention to how mature the packages are, and the more rough and abandoned it looks, the more you need to understand the source code to trust it.)