| make.wide {MLCM} | R Documentation |
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
d |
a |
Details
This is a helper function, normally used inside mlcm, and not typically exploited by the casual user.
Value
A data frame with n rows and q - 1 columns
D2--Dq |
For each dimension along which the stimulus can vary, there are |
Author(s)
Kenneth Knoblauch