barray {cata} | R Documentation |
Convert 3d array of CATA data to 4d array of CATA differences
Description
Converts a three-dimensional array (I
assessors, J
products, M
attributes) to a four-dimensional array of product
comparisons (I
assessors, J(J-1)/2
product comparisons, two outcomes (of type b
or c
), M
attributes)
Usage
barray(X, values = "bc", type.in = "binary", type.out = "binary")
Arguments
X |
three-dimensional array ( |
values |
|
type.in |
type of data submitted; default ( |
type.out |
currently only |
Value
A four-dimensional array of product comparisons having I
assessors, J(J-1)/2
product comparisons, outcomes (see values
parameter), M
attributes
References
Castura, J.C., Meyners, M., Varela, P., & Næs, T. (2022). Clustering consumers based on product discrimination in check-all-that-apply (CATA) data. Food Quality and Preference, 104564. doi:10.1016/j.foodqual.2022.104564.
Examples
data(bread)
# Get the 4d array of CATA differences for the first 8 consumers
b <- barray(bread$cata[1:8,,])