SwapOrder | R Documentation |
Invert the order of the stimuli on each trial so that they are in physical order and not the presentation order and adjust responses, accordingly to reflect whether the lower or higher stimulus pair was selected or the inverse.
SwapOrder(data)
data |
data.frame or ‘mlds.df’ object with five columns, |
Pairs of stimuli in a difference scaling experiment are often presented on top and bottom and the responses, 0 and 1, refer to bottom and top pair, respectively. SwapOrder
modifies the data.frame so that the stimuli are ordered by physical level and the responses, 0 and 1, are modified to refer to the lower and upper pair on the physical scale, respectively. If the object inherits also from class ‘mlds.df’, it has an invord
attribute that is a logical vector of length the number of rows in the data.frame. It indicates the trials on which the higher stimulus levels were presented on the bottom. If this attribute is present, it is used to modify the data.frame. In this case, the function acts as its own inverse.
A data.frame of the same format as the input data.frame but with the stimulus order modified and the response inverted on those trials on which the higher physical level stimulus were on the bottom. If the order reflects the position, it is modified to reflect the stimulus level and vice versa.
Storing the physical position of the stimuli allows the original configuration not to be lost when re-ordering the stimuli to reflect physical stimulus level. The invord
attribute could, in principle, be used, also, to test for an influence of or bias related to the physical position.
Kenneth Knoblauch
data(kk1)
kk1.swo <- SwapOrder(kk1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.