samediffSim: Simulates data from a samediff test

View source: R/samediff.R

samediffSimR Documentation

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

Details

The function makes two calls to rbinom.

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.

Author(s)

Rune Haubo B Christensen

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

## Running simulations:
samediffSim(n = 10, tau = 1, delta = 1, Ns = 10, Nd = 10)


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