Description Usage Arguments Value References Examples
View source: R/utility_functions.R
Calculates d' and c parameter estimates for the equal-variance Signal Detection Theory (SDT) model for binary data using the algebraic method. Also computes alternative metrics, including A', B, and B” (Stanislaw & Todorov, 1993).
1 | binarySDT(dat, centered = T, correct = 0)
|
dat |
either 1) a vector of four values, the frequencies for hits and false alarms followed by the associated total number of trials for each, or 2) a vector of two values, the proportion of hits and false alarms. |
centered |
logical; if |
correct |
the type of correction to use, where...
|
A named vector with five values: 1) d', the estimate of separation between the noise and signal distributions; 2) c, the estimate of response bias (the cut-off determining whether a response is 'Signal' versus 'Noise'); 3) A', a non-parametric estimate of discrimination; 4) B, the ratio of whether a person favors responding 'Signal' over whether he or she favors responding 'Noise'; 5) B”, a non-parametric estimate of B.
Hautus, M. J. (1995). Corrections for extreme proportions and their biasing effects on estimated values of d'. Behavior Research Methods Instruments, & Computers, 27(1), 46 - 51. DOI: 10.3758/BF03203619.
Macmillan, N. A. & Kaplan, H. L. (1985). Detection theory analysis of group data: estimating sensitivity from average hit and false-alarm rates. Psychological Bulletin, 98(1), 185 - 199.
Stanislaw, H. & Todorov, N. (1993). Calculation of signal detection theory measures. Behavior Research Methods, Instruments, & Computers, 31, 137 - 149.
1 2 3 4 5 6 7 8 9 10 11 12 | # Hit/false alarm rate when d' = 1 and c = 0
x = c( H = pnorm( 0, -.5 ), FA = pnorm( 0, .5 ) )
round( binarySDT( x ), 2 )
# Hit/false alarm rate when d' = 1 and c = .25
x = c( H = pnorm( .25, -.5 ), FA = pnorm( .25, .5 ) )
round( binarySDT( x ), 2 )
# Using frequencies
y = c( round( x*20 ), 20, 20 )
round( binarySDT( y ), 2 )
# Correction for extreme values
y = c( 10, 6, 10, 10 )
round( binarySDT( y, correct = 1 ), 2 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.