topc: Apply top-c choices coding to a vector of scale data from a respondent
Description
Apply top-c choices coding to a vector of scale data from a respondent
Usage
topc(x, c = 2, coding = "B")
Value
matrix X with top-k coding applied
Arguments
x
input matrix
c
number of top choices considered to be 'success'; other choices are
considered to be 'failure' and are coded 0
coding
"B" (default) codes all successes as 1;
"N" codes all successes with their numeric coding
Author
J.C. Castura
References
Castura, J.C., Meyners, M., Pohjanheimo, T., Varela, P., & Næs, T. (2023).
An approach for clustering consumers by their top-box and top-choice responses.
Journal of Sensory Studies, e12860. tools:::Rd_expr_doi("10.1111/joss.12860")