discrimPwr: Sensory discrimination power analysis In perbrock/sensR: Thurstonian Models for Sensory Discrimination

 discrimPwr R Documentation

Sensory discrimination power analysis

Description

Computes the power of a difference or similarity test for a sensory discrimination experiment using the binomial distribution. `d.primePwr` is a convenience function that calls `discrimPwr` but has arguments in terms of d-prime rather than pd, the probability of discrimination.

Usage

``````discrimPwr(pdA, pd0 = 0, sample.size, alpha = 0.05, pGuess = 1/2,
test = c("difference", "similarity"),
statistic = c("exact", "normal", "cont.normal"))

d.primePwr(d.primeA, d.prime0 = 0, sample.size, alpha = 0.05,
method = c("duotrio", "tetrad", "threeAFC", "twoAFC",
double = FALSE,
test = c("difference", "similarity"),
statistic = c("exact", "normal", "cont.normal"))
``````

Arguments

 `pdA` the probability of discrimination for the model under the alternative hypothesis; scalar between zero and one `d.primeA` d-prime for the model under the alternative hypothesis; non-negative numerical scalar `pd0` the probability of discrimination under the null hypothesis; scalar between zero and one `d.prime0` d-prime under the null hypothesis; non-negative numerical scalar `sample.size` the sample size; a scalar positive integer `alpha` the type I level of the test; scalar between zero and one `method` the discrimination protocol for which the power should be computed `double` should the 'double' variant of the discrimination protocol be used? Logical scalar. Currently not implemented for "twofive", "twofiveF", and "hexad". `pGuess` the guessing probability for the discrimination protocol, e.g. 1/2 for duo-trio and 2-AFC, 1/3 for triangle, tetrad and 3-AFC, 1/10 for two-out-of-five and hexad and 2/5 for two-out-of-five with forgiveness; scalar between zero and one `test` the type of one-sided binomial test (direction of the alternative hypothesis): "difference" corresponds "greater" and "similarity" corresponds to "less" `statistic` should power determination be based on the 'exact' binomial test, the normal approximation to this, or the normal approximation with continuity correction?

Details

The power of the standard one-tailed difference test where the null hypothesis is "no difference" is obtained with `pd0 = 0`.

The probability under the null hypothesis is given by `pd0 + pg * (1 - pd0)` where `pg` is the guessing probability `pGuess`. Similarly, the probability of the alternative hypothesis is given by `pdA + pg * (1 - pdA)`

Value

The power; a numerical scalar.

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.

Bi, J. (2001) The double discrimination methods. Food Quality and Preference, 12, pp. 507-513.

`findcr`, `discrim`, `discrimSim`, `AnotA`, `discrimSS`

Examples

``````## Finding the power of a discrimination test with d-prime = 1,
## a sample of size 30 and a type I level of .05:
pd <- coef(rescale(d.prime = 1, method = "twoAFC"))\$pd
discrimPwr(pd, sample.size = 30)
d.primePwr(1, sample.size = 30, method = "twoAFC")
## Obtaining the equivalent normal approximation with and without
## continuity correction:
discrimPwr(pd, sample.size = 30, statistic = "cont.normal")
discrimPwr(pd, sample.size = 30, statistic = "normal")

# Example from Bi (2001) with n=100 and 35 correct answers in a
# double duotrio test:
p1 <- 0.35
# Estimate of d-prime quoted by Bi(2001) was 1.06:
dp <- psyinv(p1, method="duotrio", double=TRUE)
# Power using normal approximation w/o continuity adjustment quoted by Bi(2001):
d.primePwr(dp, sample.size = 100, method="duotrio",
double=TRUE, stat="normal") # 0.73
# d.primePwr(dp, sample.size = 100, method="duotrio", double=TRUE,
#            stat="cont.normal")

# Power of exact test:
d.primePwr(dp, sample.size = 100, method="duotrio",
double=TRUE, stat="exact") # 0.697

## A similarity example:
discrimPwr(pdA = 0.1, pd0 = 0.2, sample.size = 100, pGuess = 1/3,
test = "similarity")

``````

perbrock/sensR documentation built on Nov. 5, 2023, 10:41 a.m.