Learn R Programming

MLCM (version 0.0-3)

make.wide: Create data frame for Fitting Conjoint Measurment Models by glm

Description

make.wide and make.wide.full generate a $n$ x $q - 1$ matrix from an $n$ x $2$ column subset of a data frame storing the results of a conjoint measurement experiment, where $n$ is the number of trials and $q$ is the number of levels per dimension in the stimulus set tested. Currently, make.wide.full is limited to data sets with only 2 stimulus dimensions. The columns code covariates for all but the first stimulus level, which is constrained to be 0, along each dimension. These columns take the value 0 unless one of the stimuli in the trial corresponded to a level along that dimension, in which case it takes a 1 or a -1, depending on which of the two stimuli represented that level. If both stimuli represent the same level for a dimension, then they cancel out and the column contains a 0. This function is used for each dimension along which the stimuli vary to create a design matrix for each dimension. The final design matrix is constructed inside the mlcm method by putting together the design matrices from each dimension.

Usage

make.wide(d)

make.wide.full(d)

Arguments

Value

  • A data frame with $n$ rows and $q - 1$ columns
  • D2--DqFor each dimension along which the stimulus can vary, there are $q - 1$ columns coding the absence or presence of that level of the dimension in the stimulus. If the level is present, then the value is -1 or 1 as a function of which of the two stimuli contained that level, unless both do, in which case it is, also, 0.

Details

This is a helper function, normally used inside mlcm, and not typically exploited by the casual user.

References

http://www.agrocampus-ouest.fr/math/useR-2009/slides/Knoblauch+Tandeau+Maloney.pdf