get.dprime: get dprime

Description Usage Arguments Value References Examples

Description

A function that calculates dprimes for each timing bin

Usage

1
2
3
4
5
6
get.dprime(x, signal.list, noise.list, is.index = FALSE,
  subset = (x$SeqFlag == 0 & x$Experiment == 1), 
  binmax = 16, 
  dprime.correction=c("extreme", "loglinear", "none"),
  negative.dprime = FALSE,
  bintail = 0)

Arguments

x

data frame usually obtained as an output from get.bins

signal.list

a list specifying for each condition, which "Condition" in x correspond to signal.

noise.list

a list specifying for each condition, which "Condition" in x correspond to noise.

is.index

a logical specifying whether the values in signal.list and noise.list should be treated as numeric indices of x$Condition. Default to FALSE.

subset

an optional vector specifying a subset of data to be used in the calculating dprimes.

binmax

an integer specifying maximum number of bins to be retained. All the data exceeding the limit will be discarded.

dprime.correction

the method to be used for calculating the dprime when hit rate or false alarm rate is zero or one. If dprime.correction="extreme" which is the default, zeros are replaced with 0.5/n and ones are replaced with (n-0.5)/n, where n is the number of signal or noise trials. If dprime.correction="loglinear", hit and false alarm rates are calculated by adding .5 to the numerator (the number of hit/false alarm trials) and 1 to the denominator (the number of signal/noise trials). If dprime.correction="none", no adjustment will be applied.

negative.dprime

logical. If FALSE (default), the values of zero is used in place of negative dprime values.

bintail

an optional integer specifying the number of bins to be concatenated at the tail.

Value

An object of class mrsat.data, which is a data frame containing following columns:

bin

timing bins

lags

means of time points at which the responses occured within each timing bin

dprimes

calculated as dprime = qnorm(hit) - qnomr(fa)

condition

values based on experimental conditions defined in the argument scalelist to which the dprime values belong to.

The output of get.dprime contains following additional columns:

hit

hit rate (correct response to correct stimuli) in each bin

hit.correction

a character indicating the type of correction performed when calculating hit rate.

hit.denom

total number of response to correct stimuli in each bin

fa

false alarm rate (correct response to incorrect stimuli) in each bin

fa.correction

a character indicating the type of correction performed when calculating false alarm rate.

fa.denom

total number of responses to incorrect stimuli in each bin

References

Stanislaw, H., & Todorov, N. (1999). Calculation of signal detection theory measures. Behavior Research Methods, Instruments, & Computers, 31, 137–149.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#need to define the scale.list
exp1.signal <- list(noint = c(1,3), 
                obrel = c(5,8), 
                obrelsub = c(11, 14))

exp1.noise <- list(noint = c(2,4), 
               obrel = c(6, 7, 9, 10), 
               obrelsub = c(12, 13, 15, 16))

#then load data and tag bins

data(Auditory_demo)
s01.bins <- get.bins(Auditory_demo, auditory=TRUE)

# finally, obtain dprime
s01.dp <- get.dprime(s01.bins$bins, 
  signal.list = exp1.signal, noise.list = exp1.noise, 
  is.index = TRUE, binmax=14)


plot(s01.dp)

matsukik/mrsat documentation built on May 21, 2019, 12:57 p.m.