Skip to content

Instantly share code, notes, and snippets.

@markushuff
markushuff / d_sub_a.R
Last active March 17, 2017 09:20
How to calculate sensitivity d_a ("d sub a")? Step-by-step example from the Macmillan and Creelman book.
# Calculation of d_a ("d sub a"). A step-by-step tutorial based on the book:
# Macmillan, N. A., & Creelman, C. D. (2004). Detection theory: A user’s guide.
# Psychology Press.
#
# pp. 57ff
library(ggplot2)
library(plyr)
# Create data set