dprime_table: Summary table of several discrimination experiments using the...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/d.primeTest.R

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

1
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.

Details

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

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.

Author(s)

Rune Haubo B Christensen

See Also

dprime_compare, dprime_test, posthoc.dprime_compare.

Examples

1
2
3
4
n <- rep(40, 4)
x <- c(25, 25, 30, 35)
protocol <- c("triangle", "duotrio", "threeAFC", "twoAFC")
dprime_table(x, n, protocol)

sensR documentation built on May 2, 2019, 9:43 a.m.