Learn R Programming

MConjoint (version 0.1)

mc.despack.linear.conjoint: mc.despack.linear.conjoint

Description

Given a list of designs and the data find the coefficients of the linear fit for each design and each column of data.

Usage

mc.despack.linear.conjoint(despack, data = NULL)

Arguments

despack
a design pack with the fields $cards. $designs and possibly $samps
data
Each column consist of the ranks given to the m cards in despack$cards by a single subject.

Value

A despack is returned with the following fields filled
cards
copy of despack$cards
samps
copy of despack$samps
designs
copy of despack$designs
coeffs
the calculated coefficients

Details

The function will only work correctly if the sample, despack$samps[i] correspond correctly to despack$desings[i] (eg. the sample consists of the corresponding row numbers from despack$cards). If despack$samps is null the the row names of despack$designs[i] are assumed to be the correct row numbers. (in practice this is often true)

Examples

Run this code
data(hire.despack)
data(hire.data)
hire.despack=mc.despack.linear.conjoint(hire.despack,hire.data)
hire.despack$coeffs[[3]]

Run the code above in your browser using DataLab