make.ix.mat generates a $n x p$ matrix from the $n x 5$ column data.frame storing the results of a difference scaling experiment, where $p$ is the number of stimulus levels tested and $n$ is the number of trials. The first column is the response (0 or 1), and the $p - 1$ succeeding columns code covariates for all but the first stimulus level, which is contrained to be 0. These columns take the value 0 unless the stimulus level was in the trial, in which case they take, in order, the values, 1, -1, -1, 1.make.ix.mat(data, xi = NULL, ...)resp and the next 4 columns the index of the stimulus level, 1 to $p$, labelled S1-S4data.resp (0, 1) is coded in the first column. This could be logical, instead.mlds and method = newdata for the predict method. This is exploited in the function like6pt. It is here that the argument xi is necessary since the data.frame for the first of the 6-point comparisons does not contain the highest level of the scale and so needs to be specified so that the data.frame conforms with that used to generate the ix.mat2df, mlds, lik6pt, glmdata(AutumnLab)
make.ix.mat(AutumnLab)
mlds(AutumnLab, c(1, seq(6, 30, 3)))Run the code above in your browser using DataLab