barray: Convert CATA binary data to CATA differences array

View source: R/cata.R

barrayR Documentation

Convert CATA binary data to CATA differences array

Description

Converts a three-dimensional array (I assessors, J products, M attributes) to an output array of J(J-1)/2 product comparisons.

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" returns a four-way array separating two outcomes: b and c; "bc-diff" (default) returns a three-way array of differences between outcomes b-c; "abcd" returns a four-way array separating 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

for "values = bc-diff", a three-way array of I ]assessors, J(J-1)/2 product comparisons, and M attributes; otherwise, a four-way array of I assessors, J(J-1)/2 product comparisons, binary outcomes for the paired difference, and M attributes.

Author(s)

J.C. Castura

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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.foodqual.2022.104564")}.

Examples

# Get the 4d array of CATA differences for the first 8 consumers
b <- barray(bread$cata[1:8,,])

cata documentation built on Aug. 1, 2026, 1:06 a.m.

Related to barray in cata...