View source: R/sensory.mr.sig.cell.R
sensory.mr.sig.cell | R Documentation |
This function performs for each pair of product and descriptor a multiple-response hypergeometric test as defined in Mahieu, Schlich, Visalli, and Cardot (2021) using random hypergeometric samplings to estimate the null distribution. The difference with mr.sig.cell
is that random hypergeometric samplings are performed within subjects in sensory.mr.sig.cell
sensory.mr.sig.cell(data, nsample = 2000, nbaxes.sig = Inf, two.sided = TRUE)
data |
A data.frame of evaluations in rows whose first two columns are factors (subject and product) and subsequent columns are binary numeric or integer, each column being a descriptor |
nsample |
Number of randomly sampled datasets to estimate the distribution of the value under the null hypothesis. See details |
nbaxes.sig |
The number of significant axes retuned by |
two.sided |
Logical. Should the tests be two-sided or not? |
nsample: The distribution of the value under the null hypothesis of no associations between products and descriptors is estimated using nsample datasets generated thanks to random hypergeometric samplings of the response vectors along products within subjects.
nbaxes.sig: If nbaxes.sig is lower than the total number of axes then the tests are performed on the derived contingency table corresponding to significant axes (Mahieu, Schlich, Visalli, & Cardot, 2021) This table is obtained by using the reconstitution formula of MR-CA on the first nbaxes.sig axes.
A list with the following elements:
Observed number of times each product was described by each descriptor
For each product, percentage of evaluations where each descriptor was cited for this product
Expected number of times each product was described by each descriptor under the null hypothesis
P-values of the tests per cell fdr adjusted by descriptor
The derived contingency table corresponding to nbaxes.sig axes
For each product, percentage of evaluations where each descriptor was cited for this product in the derived contingency table corresponding to nbaxes.sig axes
Loughin, T. M., & Scherer, P. N. (1998). Testing for Association in Contingency Tables with Multiple Column Responses. Biometrics, 54(2), 630-637.
Mahieu, B., Schlich, P., Visalli, M., & Cardot, H. (2021). A multiple-response chi-square framework for the analysis of Free-Comment and Check-All-That-Apply data. Food Quality and Preference, 93.
data(milkchoc)
dim.sig=sensory.mr.dimensionality.test(milkchoc)$dim.sig
res=sensory.mr.sig.cell(milkchoc,nbaxes.sig=dim.sig)
plot(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.