Learn R Programming

cata (version 0.1.0.27)

getb: Calculate the b-measure

Description

Function to calculate the b-measure, which quantifies the sensory differentiation retained.

Usage

getb(X.b, X.c, oneI = FALSE, oneM = FALSE)

Value

b-measure

Arguments

X.b

three-way (\(I \times J(J-1)/2 \times M\)) array with \(I\) assessors, \(J(J-1)/2\) product comparisons, \(M\) CATA attributes, where values are counts of types b and c from the function barray)

X.c

array of same dimension as X.b, where values are counts of types b and c from the function barray)

oneI

indicates whether calculation is for one assessor (default: FALSE)

oneM

indicates whether calculation is for one attribute (default: FALSE)

Author

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. tools:::Rd_expr_doi("10.1016/j.foodqual.2022.104564").

Examples

Run this code
data(bread)

bread.bc <- barray(bread$cata[1:8,,1:5])
getb(bread.bc[,,1,], bread.bc[,,2,])

Run the code above in your browser using DataLab