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 (I assessors, J products, M attributes) where values are 0 (not checked) or 1 (checked)

values

"bc" (default) returns two outcomes: b and c; otherwise "abcd" returns four outcomes: a, b, c, d.

type.in

type of data submitted; default (binary) may be set to ordinal or scale.

type.out

currently only binary is implemented

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,,])

[Package cata version 0.1.0.6 Index]