Learn R Programming

sensR (version 1.5-2)

dprime_table: Summary table of several discrimination experiments using the simple-binomial protocols (Duo-Trio, Triangle, Tetrad, 2-AFC and 3-AFC)

Description

This function provides a summary table with the following quantities: no. correct trials (correct), total number of trials (total), the protocol (protocol), probability of a correct answer (pHat), standard error of pHat (se.pHat), d-prime (dprime), and standard error of d-prime (se.dprime).

Usage

dprime_table(correct, total, protocol, restrict.above.guess = TRUE)

Arguments

correct

a numeric vector of the number of correct answers; one element for each test.

total

a numeric vector of the total number of trials; one element for each test.

protocol

a character vector or factor naming the protocol used; one element for each test. Currently the following protocols are supported: "triangle", "duotrio", "threeAFC", "twoAFC", "tetrad".

restrict.above.guess

controls if pHat should be restricted at or above the guessing probability for the given protocol. This also affects se.pHat. Note that dprime is zero and se.dprime is NA when pHat is at or below the guessing probability of the given protocol.

Value

a data.frame with columns:

correct

numeric vector of no. correct.

total

numeric vector of no. trials.

protocol

character vector naming the protocols used.

pHat

Estimate of the probability of correct answers.

se.pHat

standard error of pHat.

dprime

estimate of d-prime.

se.dprime

standard error of dprime.

Details

The vectors correct, total and protocol have to be of the same length.

See Also

dprime_compare, dprime_test, posthoc.dprime_compare.

Examples

Run this code
# NOT RUN {
n <- rep(40, 4)
x <- c(25, 25, 30, 35)
protocol <- c("triangle", "duotrio", "threeAFC", "twoAFC")
dprime_table(x, n, protocol)

# }

Run the code above in your browser using DataLab