discrim {sensR}R Documentation

Sensory discrimination analysis

Description

Computes the d-prime, its standard error and P-value for the hypothesis of no sensory difference for any of four methods: 2-AFC, 3-AFC, duotrio and triangle tests.

Usage

discrim(success, total,
        method = c("duotrio", "threeAFC", "twoAFC", "triangle"),
        pd0 = 0, type = c("difference", "similarity"), ...)

Arguments

success the number of correct answers
total the total number of answers (sample size)
method the discrimination protocol. Four allowed values: "twoAFC", "threeAFC", "duotrio", "triangle"
pd0 the proportion of discriminators in the population of interest
type the type of test
... additional arguments passed to glm

Details

The p-value for the standard one-tailed difference test of "no difference" is obtained with pd0 = 0.

The probability under the null hypothesis is given by pd0 + p0 * (1 - pd0) where p0 is the guessing probability defined by the method argument.

The function uses the one of the dedicated binomial families and the base function glm

Value

An object of class discrim with elements

coefficients named vector of coefficients (d-prime and tau)
res.glm the glm-object from the fitting process
vcov variance-covariance matrix of the coefficients
se named vector with standard error of the coefficients (standard error of d-prime)
data a named vector with the data supplied to the function
p.value one-tailed exact binomial p-value
test a string with the name of the test for the print method
call the matched call

Author(s)

Rune Haubo B Christensen and Per Bruun Brockhoff

References

Brockhoff, P.B. and Christensen, R.H.B (2010). Thurstonian models for sensory discrimination tests as generalized linear models. Food Quality and Preference, 21, pp. 330-338.

See Also

triangle, twoAFC, threeAFC, duotrio, discrimPwr, discrimSim, discrimSS, samediff, AnotA, findcr

Examples

## Running the simple discrimination (differens) tests:
discrim(10, 15, method = "twoAFC")
discrim(10, 15, method = "threeAFC")
discrim(10, 15, method = "duotrio")
discrim(10, 15, method = "triangle")

## A similarity test where less than chance successes are obtained:
discrim(20, 75, "triangle", pd0 = .2, type = "simil")


[Package sensR version 1.1.0 Index]