madperm: Permutation tests for CATA data

View source: R/ocov.R

madpermR Documentation

Permutation tests for CATA data

Description

Permutation tests for check-all-that-apply (CATA) data following the 'one citation, one vote' principle. Returns CATA frequency and percentage tables per condition and permutation test results specified.

Usage

madperm(X, B = 99, seed = .Random.seed, tests = 1:5, alpha = 0.05, control.fdr = FALSE, 
verbose = FALSE)

Arguments

X

a three-way (or four-way) array with I assessors, (R conditions/timepoints,) P products, T terms with data valued 0 (not checked) and 1 (checked)

B

permutations in null distribution; ensure B is larger than the default value (99) when conducting real analyses

seed

specify a numeric seed for reproducibility; if not provided, a random seed is generated

tests

numeric vector specifying which tests to conduct; default 1:5 (all tests): (1) multivariate (global) test; (2) univariate tests; (3) elementwise tests; (4) pairwise multivariate tests; (5) pairwise univariate tests

alpha

Type I error rate (default: \alpha = 0.05)

control.fdr

control False Discovery Rate (using Benjamini-Hochberg (BH) step-up procedure)? (default: FALSE)

verbose

return null distribution(s) and function call? (default: FALSE)

Value

list, one per condition:

  • CATA.table : table of CATA citation percentages (P \times T)

  • CATA.freq : CATA frequency table (P \times T)

  • Permutation test results specified by the tests parameter

    1. Global.Results : list of multivariate (global) results

    2. Univariate.Results : list of T univariate results

    3. Elementwise.Results : list of PT elementwise results

    4. Multivariate.Paired.Results : list of P(P-1)/2 multivariate paired results

    5. Univariate.Paired.Results : list of P(P-1)T/2 univariate paired results

also, if verbose is TRUE:

  • Null.Dist list of null distributions for tests specified

  • Call : madperm function call

Author(s)

J.C. Castura

References

Chaya, C., Castura, J.C., & Greenacre, M.J. (2025). One citation, one vote! A new approach for analyzing check-all-that-apply (CATA) data in sensometrics, using L1 norm methods. \Sexpr[results=rd]{tools:::Rd_expr_doi("doi:10.48550/arXiv.2502.15945")}

Examples

data(bread)
# add product names
X <- bread$cata[1:100,,1:5]
dimnames(X)[[2]] <- paste0("P", dimnames(X)[[2]])
# permutation tests for the first 100 consumers and 5 attributes
# will be run with default parameter values for illustrative purposes only
res <- madperm(X, B = 99, seed = 123)
print(res) # inspect results

cata documentation built on April 4, 2025, 5:17 a.m.

Related to madperm in cata...