discrimSim {sensR} | R Documentation |
Simulates the outcome of sample.size
replicated sensory
difference tests (for any one of four protocols: 2-AFC, 3-AFC, duotrio
and triangle tests)
for a given d-prime value and a given overdispersion (default 0).
discrimSim(sample.size, replicates, delta, sd.indiv = 0, method = c("duotrio", "halfprobit", "probit", "triangle", "twoAFC", "threeAFC"))
sample.size |
The sample size - number of subjects |
replicates |
Number of replications per subject |
delta |
The delta (d-prime) value |
method |
The discrimination protocol |
sd.indiv |
the individual variability in d-prime values. A value of 0 (default) is default and corresponds to complete independence |
The function uses the four thurstonian binomial families.
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
,
discrimPwr
, discrim
,
AnotA
, discrimSS
,
samediff
, findcr
## Running simulations: discrimSim(sample.size = 10, replicates = 3, delta = 2, method = "triangle", sd.indiv = 1)