discrimSS {sensR}R Documentation

Sensory discrimination sample size calculation

Description

Computes the sample size for a difference or similarity test for a sensory discrimination experiment using the binomial distribution. d.primeSS is a convenience function that calls discrimSS but has arguments in terms of d-prime rather than pd, the expected proportion of discriminators.

Usage

discrimSS(pdA, pd0 = 0, target.power = 0.90, alpha = 0.05,
          pGuess = 1/2, test = c("difference", "similarity"),
          statistic = c("exact", "stable.exact", "both.exact",
           "normal", "cont.normal"))

d.primeSS(d.primeA, d.prime0 = 0, target.power = 0.90, alpha = 0.05,
          method = c("duotrio", "tetrad", "threeAFC", "twoAFC",
            "triangle", "hexad", "twofive", "twofiveF"),
          double = FALSE,
          test = c("difference", "similarity"),
          statistic = c("exact", "stable.exact", "both.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

target.power

the desired power for the test

alpha

the type I level of the test; scalar between zero and one

method

the discrimination protocol for which the sample size 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

options are explained in the Details section below

Details

For difference tests pdA or d.primeA (the sensory difference under the alternative hypothesis) has to be larger than pd0 or d.prime0 (the sensory difference under the null hypothesis). The sample size of the standard one-tailed difference test where the null hypothesis of "no difference" is obtained with pd0 = 0 or d.prime0 = 0.

For similarity tests it is required that pd0 > pdA or equivalently that d.prime0 > d.primeA. Here, the interval [0, pdA] or [0, d.primeA] is the similarity region covering sensory differences for which we would say that the products are similar.

The probability of a correct answer under the null hypothesis is given by pd0 + pGuess * (1 - pd0). Similarly, the probability of a correct answer under the alternative hypothesis is given by pdA + pGuess * (1 - pdA).

The statistic argument:

If the sample size based on the continuity adjusted normal approximation is larger than 10,000, the function returns the normal approximation and issues a warning.

Value

The sample size; an integer.

Author(s)

Per Bruun Brockhoff and Rune Haubo B Christensen

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.

Ennis, J.M. and V. Jesionka (2011). The power of sensory discrimination methods revisited. Journal of Sensory Studies, 26, pp. 371-382.

See Also

AnotA, discrimPwr, samediff, findcr

Examples

## Finding the smallest necessary sample size:
discrimSS(pdA = 0.5, pd0 = 0, target.power = 0.80, alpha = 0.05,
   pGuess = 1/2, test = "difference", statistic = "exact")
## The stable-exact sample size is larger:
discrimSS(pdA = 0.5, pd0 = 0, target.power = 0.80, alpha = 0.05,
   pGuess = 1/2, test = "difference", statistic = "stable.exact")

## Give identical results:
pd <- coef(rescale(d.prime = 1, method = "twoAFC"))$pd
discrimSS(pdA = pd, pd0 = 0, target.power = 0.90, alpha = 0.05,
   pGuess = 1/2, test = "difference", statistic = "exact")
d.primeSS(1, target.power = 0.90, method = "twoAFC")

## A similarity example:
discrimSS(pdA = 0.1, pd0 = 0.2, target.power = 0.80, alpha = 0.05,
   pGuess = 1/2, test = "similarity", statistic = "exact")


[Package sensR version 1.5-3 Index]