make.wide {MLCM}R Documentation

Create data frame for Fitting Conjoint Measurment Models by glm

Description

make.wide and make.wide.full generate a nn x q1q - 1 matrix from an nn x 22 column subset of a data frame storing the results of a conjoint measurement experiment, where nn is the number of trials and qq 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 nx2n x 2 column data frame. The columns give the indices of the levels of the dimensions along which the two stimuli presented in a trial vary.

Details

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

Value

A data frame with nn rows and q1q - 1 columns

D2--Dq

For each dimension along which the stimulus can vary, there are q1q - 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.

Author(s)

Kenneth Knoblauch


[Package MLCM version 0.4.3 Index]