Coerce a data frame from an MLDS experiment to an object of class
mlds.df by adding column names and attributes so that it will be properly treated by methods related to the MLDS functions.
1 2 3 4 5 6 7 8 9 10
a 4 or 5 column data frame from an MLDS experiment, with one column of responses followed by three or four, respectively, indicating the indices of the stimuli from each trial or a data frame of > 5 columns with the response in the first column and the covariates (signed indicator variables) for the stimuli of each trial in the rest of the columns
numeric indicating the stimulus levels from the MLDS experiment
additional arguments passed to the methods
This function coerces a data frome from an MLDS experiment to an object of class
mlds.df but inheriting from class
data.frame. It changes the column names to
S3 and if a quad experiment,
S4 and adds two attributes:
stimulus, a vector of scale values used in plotting the estimated scale and
invord, a logical vector indicating the order of the presentation of pairs (were the larger scale values on the bottom or not) which is used with the
Note that when the argument is in signed indicator form, just a data frame is returned with no special
data.frame of class
invord attributes, unless the input is in signed indicator form. See details.
If the scale starts at 0, then 1 should be added to each scale value because the scale values will be used as indices and
R indices start at 1, not 0.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.