A body detection inversion effect revealed by a large-scale inattentional blindness experiment. Cognition (2025)
The following is a R porting of the nice matlab function coming from Fleming and Lau ( Fleming, Stephen M., and Hakwan C. Lau. "How to measure metacognition." Frontiers in human neuroscience 8 (2014): 443 ).
As they state in their nice paper: "The area under the type 2 ROC curve (AUROC2) can then be used as a measure of metacognitive sensitivity. This method is more advantageous than the gamma and phi correlations because it is bias-free (i.e., it is theoretically uninfluenced by the overall propensity of the subject to say high confidence) and in contrast to type 2 d′ does not make parametric assumptions that are known to be false."
Adapted R code below for the AUROC2 function: