SimMLDS: Simulate Output of MLDS Experiment

View source: R/SimMLDS.R

SimMLDSR Documentation

Simulate Output of MLDS Experiment

Description

Given a block of trials of an MLDS experiment, an underlying response function and the judgment variability, simulate the response of an observer.

Usage

SimMLDS(Trials, Scale, Sigma, n = 1)

Arguments

Trials

an N by 4 or 3 matrix or data frame of integers indicating the n trials of an MLDS experiment. The columns indicate the indices of the stimuli presented on a trial, 4 for an experiment with quadruples and 3 for triads. A data frame for this argument is most easily generated with the combn function.

Scale

a vector of values indicating the underlying responses of the simulated observer for each stimulus level. The length of this vector should equal the largest integer in Trials.

Sigma

a vector of length 1 indicating the judgment standard deviation of the simulated observer.

n

integer giving number of simulated data sets to return

Details

Given a data frame of indices to the responses associated with stimulus levels and the judgment variability, the function returns the results of 1 or multiple MLDS experiments, either with triads or quads, depending on the number of columns in the data frame.

Value

If the argument n is set to 1 (default), an object of class ‘mlds.df’ or ‘mlbs.df’ with simulated responses. If n is greater than 1, a list of such objects is returned.

Author(s)

Kenneth Knoblauch and Laurence T. Maloney

References

Maloney, L. T. and Yang, J. N. (2003). Maximum likelihood difference scaling. Journal of Vision, 3(8):5, 573–585, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1167/3.8.5")}.

Knoblauch, K. and Maloney, L. T. (2008) MLDS: Maximum likelihood difference scaling in R. Journal of Statistical Software, 25:2, 1–26, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v025.i02")}.

See Also

see also boot.mlds

Examples


Tr <- t(combn(10, 4))
Sc <- seq(0, 1, len = 11)^2
Sig <- 0.2
sim.lst <- SimMLDS(Tr, Sc, Sig, n = 10)
sim.res <- sapply(sim.lst, mlds)



MLDS documentation built on Aug. 20, 2023, 9:06 a.m.