Jason Finley
Jason Finley

Reputation: 71

R: pROC package: entering data as hit rates and false alarm rates?

Q: Is there a way to import data in the form of hit rates and false alarm rates into a roc object with the pROC R package?

Background: In cognitive psychology we use the term "hit rate" which is equivalent to Sensitivity and "false alarm rate" which is equivalent to 1-Specificity. A common task is a recognition memory test. For example, a participant first studies a list of words (which we'll call "targets"). Later, they take a test in which they view a series of words, some of which are targets that were on the earlier list, and some of which are "lures" that were not on the earlier list. For each word, the participant responds YES (I studied this word before) or NO (I didn't study this word before), and then they also give a confidence rating (e.g., from 50% confidence [just guessing] to 100% confidence [absolutely certain]).

The hit rate is the proportion of target words that the participant correctly said YES to. The false alarm rate is the proportion of lure words that the participant incorrectly said YES to. By calculating cumulative hit rate and false alarm rate across several levels of confidence (aka "bins"), we can plot an empirical ROC curve, with false alarm rate on the x-axis and hit rate on the y-axis.

So, suppose I have recognition memory data in the form of cumulative hit rate and false alarm rate across 5 confidence bins. For example: False Alarm Rate: .05, .11, .20, .28, .45 Hit Rate: .45, .52, .57, .59, .62

I would like to get those data into an roc object using the pROC package, so that I can fit a curve and calculate partial AUC. Is there any way to do this? Thank you, ~jason finley

Upvotes: 2

Views: 551

Answers (1)

Calimo
Calimo

Reputation: 7949

Is there any way to do this?

Short answer: No.

Long answer:

  1. You can't build a ROC curve from a confusion matrix. While it might be possible to do it if you had all confusion matrices, this is clearly not your case. Any curve you build like this is not a ROC curve.
  2. Even if you were able to build the ROC curve and calculate the AUC using point 1 above, all the extra functionalities such as error estimation (variance, CI), smoothing etc. require the full, un-summarized data.

Upvotes: 2

Related Questions