Learn R Programming

sensR (version 1.5-2)

samediffSim: Simulates data from a samediff test

Description

Simulates the outcome of n same-different experiments.

Usage

samediffSim(n, tau, delta, Ns, Nd)

Arguments

n

the number of experiments to simulate.

tau

the value of "tau".

delta

the value of delta (d-prime).

Ns

number of same-samples

Nd

number of different-samples

Value

A matrix of with n rows and four columns named ss, ds, sd, dd with the number of same-answers to same-samples, different-answers to same-samples, same-answers to different-samples and different-answers to different-samples respectively.

Details

The function makes two calls to rbinom.

References

Christensen, R.H.B., Brockhoff, P.B. (2009). Estimation and inference in the same-different test. Food, Quality and Preference, 20 pp. 514--520

See Also

discrimSim

Examples

Run this code
# NOT RUN {
## Running simulations:
samediffSim(n = 10, tau = 1, delta = 1, Ns = 10, Nd = 10)

# }

Run the code above in your browser using DataLab