dprime: Dprime (d') and Other Signal Detection Theory indices.

Description Usage Arguments Value Author(s) Examples

View source: R/dprime.R

Description

Computes Signal Detection Theory indices, including d', beta, A', B”D and c.

Usage

1
2
3
4
5
6
7
8
9
dprime(
  n_hit,
  n_fa,
  n_miss = NULL,
  n_cr = NULL,
  n_targets = NULL,
  n_distractors = NULL,
  adjusted = TRUE
)

Arguments

n_hit

Number of hits.

n_fa

Number of false alarms.

n_miss

Number of misses.

n_cr

Number of correct rejections.

n_targets

Number of targets (n_hit + n_miss).

n_distractors

Number of distractors (n_fa + n_cr).

adjusted

Should it use the Hautus (1995) adjustments for extreme values.

Value

Calculates the d', the beta, the A' and the B”D based on the signal detection theory (SRT). See Pallier (2002) for the algorithms.

Returns a list containing the following indices:

Note that for d' and beta, adjustement for extreme values are made following the recommandations of Hautus (1995).

Author(s)

Dominique Makowski

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library(psycho)

n_hit <- 9
n_fa <- 2
n_miss <- 1
n_cr <- 7

indices <- psycho::dprime(n_hit, n_fa, n_miss, n_cr)


df <- data.frame(
  Participant = c("A", "B", "C"),
  n_hit = c(1, 2, 5),
  n_fa = c(6, 8, 1)
)

indices <- psycho::dprime(
  n_hit = df$n_hit,
  n_fa = df$n_fa,
  n_targets = 10,
  n_distractors = 10,
  adjusted = FALSE
)

neuropsychology/psycho.R documentation built on Jan. 25, 2021, 7:59 a.m.