ix.mat2df: Transform data.frame back to Raw Difference Scale Format

ix.mat2dfR Documentation

Transform data.frame back to Raw Difference Scale Format

Description

ix.mat2df converts a long data.frame that is used as the data argument for mlds with method = “glm” to the 5 column format, typically from the results of a difference scaling experiment. The first column is the response and the next four are the ranks of the stimulus levels used in each trial, the 2 pairs. ix.mat2df is the inverse of make.ix.mat. This form of data.frame is used with the “optim” method of mlds.

Usage

ix.mat2df(d)

Arguments

d

a data.frame with p columns and n rows, where p is the number of stimulus levels and n is the number of trials. The first column is the resp, 0 or 1, and the next p - 1 columns correspond to the incidences of the stimulus levels on each trial, 3 or 4 per row, with the signs + - - +. The column corresponding to the lowest level stimulus is deleted, as its coefficient is contrained to equal 0 in the current parameterization of the problem. Thus, 3 non-zero terms would be of the form - - +, indicating the presence of the lowest level stimulus in the trial.

Value

A 5 column data.frame which could be coerced to interger.

resp

The response, 0 or 1, indicating which pair was chosen

S1-S4

The rank of the 4 stimulus levels presented on each trial.

Author(s)

Kenneth Knoblauch

See Also

make.ix.mat, mlds

Examples

	
data(AutumnLab)
ix.mat <- make.ix.mat(AutumnLab)
#orig.df <- ix.mat2df(ix.mat) # should be the same as original
# better to use as.mlds.df as ix.mat2df is deprecated
orig.df <- as.mlds.df(ix.mat) 


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