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

Simulates the outcome of `sample.size`

replicated sensory
difference tests (for any one of eight protocols: 2-AFC, 3-AFC,
duotrio, tetrad, triangle, two-out-of-five, two-out-of-five with
forgiveness and hexad tests)
for a given d-prime value and a given overdispersion (default 0).

1 2 3 4 | ```
discrimSim(sample.size, replicates, d.prime, sd.indiv = 0,
method = c("duotrio", "halfprobit", "probit", "tetrad",
"triangle", "twoAFC", "threeAFC", "hexad", "twofive", "twofiveF"),
double = FALSE)
``` |

`sample.size` |
the sample size - number of subjects |

`replicates` |
number of replications per subject |

`d.prime` |
the value of d-prime |

`method` |
the discrimination protocol |

`sd.indiv` |
the individual variability in d-prime values. A value of 0 (default) corresponds to complete independence |

`double` |
should the 'double' variant of the discrimination protocol be used? Logical scalar. Currently not implemented for "twofive", "twofiveF", and "hexad". |

The d-prime for each subject is a random draw from a normal
distribution with mean `d.prime`

and standard deviation
`sd.indiv`

. All negative values are set to zero.

A vector of length `sample.size`

with the number of correct
answers for each subject.

Rune Haubo B Christensen and Per Bruun Brockhoff

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.

`triangle`

, `twoAFC`

,
`threeAFC`

, `duotrio`

,
`tetrad`

, `twofive`

,
`twofiveF`

, `hexad`

,
`discrimPwr`

, `discrim`

,
`AnotA`

, `discrimSS`

,
`samediff`

, `findcr`

1 2 3 | ```
## Running simulations:
discrimSim(sample.size = 10, replicates = 3, d.prime = 2,
method = "triangle", sd.indiv = 1)
``` |

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.