With the pROC package, I can do this:
true <- c(1, 1, 1, 0)
predicted <- c(0.5, 0.1, 0.6, 0.1)
roc(true, predicted)
which gives as expected:
> Call:
> roc.default(response = true, predictor = predicted)
> Data: predicted in 1 controls (true 0) < 3 cases (true 1).
> Area under the curve: 0.8333
I'm not sure why the following is working.
true <- c(1, 1, 1, 0)
predicted <- c(5, -1, 600, 10)
roc(true, predicted)
> Call:
> roc.default(response = true, predictor = predicted)
> Data: predicted in 1 controls (true 0) > 3 cases (true 1).
> Area under the curve: 0.6667
I was expecting an error about predictors being non-probability values, but things are silently accepted. Can someone tell me what's happening behind the scene?