| Title: | Analysis of Data from Multiple-Response Questionnaires |
|---|---|
| Description: | Provides a multiple-response chi-square framework for the analysis of contingency tables arising from multiple-response questionnaires, such as check-all-that-apply tasks, where response options are crossed with a known grouping factor. The framework accommodates within-block (e.g., within-subject) designs, as commonly encountered in sensory evaluation. It comprises a multiple-response chi-square test of homogeneity with an associated dimensionality test, a multiple-response Correspondence Analysis (CA), and per-cell multiple-response hypergeometric tests. These methods extend their classical counterparts by grounding inference in a null model that properly accounts for the multiple-response nature of the data, treating evaluations, rather than individual citations, as the experimental units, yielding more statistically valid conclusions than standard contingency table analyses. Details may be found in Mahieu, Schlich, Visalli, and Cardot (2021). <doi:10.1016/j.foodqual.2021.104256>. |
| Authors: | Benjamin Mahieu [aut, cre] |
| Maintainer: | Benjamin Mahieu <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.4.1 |
| Built: | 2026-05-23 06:53:30 UTC |
| Source: | https://github.com/cran/MultiResponseR |
Data coming from a Check-All-That-Apply experiment on milk chocolates. This dataset corresponds to the flavor data used as examples and described more precisely in Mahieu, Schlich, Visalli, and Cardot (2021)
data(milkchoc)data(milkchoc)
An object of class data.frame with 280 rows and 8 columns.
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)data(milkchoc)
Performs a multiple-response chi-square test as defined in Loughin and Scherer (1998) using random permutations to estimate the null distribution.
mr.chisq.test(data, nperm = 300)mr.chisq.test(data, nperm = 300)
data |
A data.frame of observations in rows whose first column is a factor (the categories) and subsequent columns are binary numeric or integer, each column being a response option. |
nperm |
Number of permuted datasets to estimate the distribution of the statistic under the null hypothesis. See details. |
nperm: The distribution of the statistic under the null hypothesis of no associations between categories and response options is estimated using nperm datasets generated thanks to random permutations of the response vectors along observations. Note that this differs from the original proposition of Loughin and Scherer (1998) who used a parametric bootstrap to do so.
A list with the following elements:
Observed multiple-response chi-square statistic
p-value of the test
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.
nb.obs=200 nb.response=5 nb.category=5 vec.category=paste("C",1:nb.category,sep="") right=matrix(rbinom(nb.response*nb.obs,1,0.25),nb.obs,nb.response) category=sample(vec.category,nb.obs,replace = TRUE) dset=cbind.data.frame(category,right) dset$category=as.factor(dset$category) mr.chisq.test(dset)nb.obs=200 nb.response=5 nb.category=5 vec.category=paste("C",1:nb.category,sep="") right=matrix(rbinom(nb.response*nb.obs,1,0.25),nb.obs,nb.response) category=sample(vec.category,nb.obs,replace = TRUE) dset=cbind.data.frame(category,right) dset$category=as.factor(dset$category) mr.chisq.test(dset)
Performs a multiple-response dimensionality test as defined in Mahieu, Schlich, Visalli, and Cardot (2021) using random permutations to estimate the null distribution.
mr.dimensionality.test(data, nperm = 300, alpha = 0.05)mr.dimensionality.test(data, nperm = 300, alpha = 0.05)
data |
A data.frame of observations in rows whose first column is a factor (the categories) and subsequent columns are binary numeric or integer, each column being a response option. |
nperm |
Number of permuted datasets to estimate the distribution of the statistic under the null hypothesis. See details. |
alpha |
The alpha risk of the test |
nperm: The distribution of the statistic under the null hypothesis of no associations between categories and response options is estimated using nperm datasets generated thanks to random permutations of the response vectors along observations.
A list with the following elements:
The number of significant dimensions
Observed multiple-response chi-square statistic of each dimension
P-value of the test of each dimension adjusted for closed testing procedure
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.
nb.obs=200 nb.response=5 nb.category=5 vec.category=paste("C",1:nb.category,sep="") right=matrix(rbinom(nb.response*nb.obs,1,0.25),nb.obs,nb.response) category=sample(vec.category,nb.obs,replace = TRUE) dset=cbind.data.frame(category,right) dset$category=as.factor(dset$category) mr.dimensionality.test(dset)nb.obs=200 nb.response=5 nb.category=5 vec.category=paste("C",1:nb.category,sep="") right=matrix(rbinom(nb.response*nb.obs,1,0.25),nb.obs,nb.response) category=sample(vec.category,nb.obs,replace = TRUE) dset=cbind.data.frame(category,right) dset$category=as.factor(dset$category) mr.dimensionality.test(dset)
This function performs for each pair of category and response option a multiple-response hypergeometric test as defined in Mahieu, Schlich, Visalli, and Cardot (2021) using random hypergeometric samplings to estimate the null distribution.
mr.sig.cell(data, nsample = 300, nbaxes.sig = Inf, two.sided = TRUE)mr.sig.cell(data, nsample = 300, nbaxes.sig = Inf, two.sided = TRUE)
data |
A data.frame of observations in rows whose first column is a factor (the categories) and subsequent columns are binary numeric or integer, each column being a response option. |
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 categories and response options is estimated using nsample datasets generated thanks to random hypergeometric samplings of the response vectors along observations.
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 category chosen each response option
Within each category, percentage of observations where the response options were chosen
Expected number of times each category chosen each response option under the null hypothesis
P-values of the tests per cell fdr adjusted by response option
The derived contingency table corresponding to nbaxes.sig axes
Within each category, percentage of observations where the response options were chosen 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.
nb.obs=200 nb.response=5 nb.category=5 vec.category=paste("C",1:nb.category,sep="") right=matrix(rbinom(nb.response*nb.obs,1,0.25),nb.obs,nb.response) category=sample(vec.category,nb.obs,replace = TRUE) dset=cbind.data.frame(category,right) dset$category=as.factor(dset$category) res=mr.sig.cell(dset) plot(res)nb.obs=200 nb.response=5 nb.category=5 vec.category=paste("C",1:nb.category,sep="") right=matrix(rbinom(nb.response*nb.obs,1,0.25),nb.obs,nb.response) category=sample(vec.category,nb.obs,replace = TRUE) dset=cbind.data.frame(category,right) dset$category=as.factor(dset$category) res=mr.sig.cell(dset) plot(res)
This functions performs a multiple-response Correspondence Analysis (MR-CA) as defined in Mahieu, Schlich, Visalli, and Cardot (2021).
mrCA( data, proj.row = NULL, proj.row.obs = NULL, proj.col = NULL, ellipse = FALSE, nboot = 300, nbaxes.sig = Inf )mrCA( data, proj.row = NULL, proj.row.obs = NULL, proj.col = NULL, ellipse = FALSE, nboot = 300, nbaxes.sig = Inf )
data |
A data.frame of observations in rows whose first column is a factor (the categories) and subsequent columns are binary numeric or integer, each column being a response option. |
proj.row |
Optional. A contingency table with new categories to be projected as supplementary rows within the MR-CA space in rows and the same response options as data in columns. |
proj.row.obs |
A numeric vector whose length equals nrow(proj.row) and giving the number of observations within each projected rows. Useless if proj.row=NULL. |
proj.col |
Optional. A contingency table with new response options to be projected as supplementary columns within the MR-CA space in columns and the same categories as data in rows. |
ellipse |
Logical. Are confidence ellipses for the categories to be computed? Default is FALSE. See details. |
nboot |
Number of virtual datasets used in the total bootsrap procedure. Useless when ellipse=FALSE. See details. |
nbaxes.sig |
The number of significant axes retuned by |
ellipse: When ellipse=TRUE, confidence ellipses for the categories are computed using a total bootstrap procedure (Cadoret & Husson, 2013). nboot virtual datasets are generated by randomly sampling with replacement response vectors within each category. A MR-CA is then performed on these virtual dataset and the resulting virtual configurations are adjusted to the actual configuration using Procrustes rotations accounting for nbaxes.sig axes (Mahieu, Schlich, Visalli, & Cardot, 2021). Finally, for each category, a confidence ellipse is constructed using the position of its bootstrap replicates. The ellipses are plotted when using plot.mrCA Pairwise total bootstrap tests as proposed in Castura et al. (2023) are also performed between the categories.
A list with the following elements:
Eigenvalues and their corresponding percentages of inertia
Rows coordinates
Columns coordinates
Projected rows coordinates
Projected columns coordinates
Results of the singular value decomposition
Coordinates of the rotated bootstrap replicates
P-values of the pairwise total bootstrap tests
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.
Loughin, T. M., & Scherer, P. N. (1998). Testing for Association in Contingency Tables with Multiple Column Responses. Biometrics, 54(2), 630-637.
Cadoret, M., & Husson, F. (2013). Construction and evaluation of confidence ellipses applied at sensory data. Food Quality and Preference, 28(1), 106-115.
Castura, J. C., Varela, P., & Næs, T. (2023). Evaluation of complementary numerical and visual approaches for investigating pairwise comparisons after principal component analysis. Food Quality and Preference, 107.
nb.obs=200 nb.response=5 nb.category=5 vec.category=paste("C",1:nb.category,sep="") right=matrix(rbinom(nb.response*nb.obs,1,0.25),nb.obs,nb.response) category=sample(vec.category,nb.obs,replace = TRUE) dset=cbind.data.frame(category,right) dset$category=as.factor(dset$category) res=mrCA(dset) plot(res)nb.obs=200 nb.response=5 nb.category=5 vec.category=paste("C",1:nb.category,sep="") right=matrix(rbinom(nb.response*nb.obs,1,0.25),nb.obs,nb.response) category=sample(vec.category,nb.obs,replace = TRUE) dset=cbind.data.frame(category,right) dset$category=as.factor(dset$category) res=mrCA(dset) plot(res)
This function plots the results coming from mr.sig.cell.
## S3 method for class 'mr.sig.cell' plot( x, alpha.1 = 0.05, alpha.2 = 0, choice = "percent.derived.cont", col.greater.1 = "green3", col.lower.1 = "orangered", col.greater.2 = "lightgreen", col.lower.2 = "lightsalmon", ... )## S3 method for class 'mr.sig.cell' plot( x, alpha.1 = 0.05, alpha.2 = 0, choice = "percent.derived.cont", col.greater.1 = "green3", col.lower.1 = "orangered", col.greater.2 = "lightgreen", col.lower.2 = "lightsalmon", ... )
x |
A list returned by |
alpha.1 |
The alpha risk to consider the tests as significant. |
alpha.2 |
The alpha risk to consider the tests as showing a trend. If trends are not to be considered, alpha.2 can be set to 0 (Default). |
choice |
Which table from res should be plotted? Default is percent.derived.cont. |
col.greater.1 |
The color used to highlight significant positive associations. |
col.lower.1 |
The color used to highlight significant negative associations. |
col.greater.2 |
The color used to highlight positive associations showing a trend. |
col.lower.2 |
The color used to highlight negative associations showing a trend. |
... |
further arguments passed to or from other methods. |
A table with cells highlighted.
nb.obs=200 nb.response=5 nb.category=5 vec.category=paste("C",1:nb.category,sep="") right=matrix(rbinom(nb.response*nb.obs,1,0.25),nb.obs,nb.response) category=sample(vec.category,nb.obs,replace = TRUE) dset=cbind.data.frame(category,right) dset$category=as.factor(dset$category) res=mr.sig.cell(dset) plot(res)nb.obs=200 nb.response=5 nb.category=5 vec.category=paste("C",1:nb.category,sep="") right=matrix(rbinom(nb.response*nb.obs,1,0.25),nb.obs,nb.response) category=sample(vec.category,nb.obs,replace = TRUE) dset=cbind.data.frame(category,right) dset$category=as.factor(dset$category) res=mr.sig.cell(dset) plot(res)
This function plots the results coming from mrCA.
## S3 method for class 'mrCA' plot( x, axes = c(1, 2), alpha.total.bootstrap.test = 0.05, alpha.ellipse = alpha.total.bootstrap.test, select.rep = rownames(x$col.coord), rev.x = FALSE, rev.y = FALSE, size.points = 3.5, size.lab = 6, size.head.arrow = 0.4, expansion = 1.25, title = NULL, ... )## S3 method for class 'mrCA' plot( x, axes = c(1, 2), alpha.total.bootstrap.test = 0.05, alpha.ellipse = alpha.total.bootstrap.test, select.rep = rownames(x$col.coord), rev.x = FALSE, rev.y = FALSE, size.points = 3.5, size.lab = 6, size.head.arrow = 0.4, expansion = 1.25, title = NULL, ... )
x |
A list returned by |
axes |
Which dimensions of the MR-CA should be plotted? |
alpha.total.bootstrap.test |
The alpha risk of the total bootstrap tests. Only useful if the MR-CA was computed using |
alpha.ellipse |
The alpha risk of the confidence ellipses. Only useful if the MR-CA was computed using |
select.rep |
A character vector specifying the response options to plot. By default, all response options are plotted. |
rev.x |
Should the horizontal plotted dimension be reversed? Useful in case of map comparisons to align categories. |
rev.y |
Should the vertical plotted dimension be reversed? Useful in case of map comparisons to align categories. |
size.points |
The size of the points used to represent the categories on the map. |
size.lab |
The size of the label on the map. |
size.head.arrow |
The size of the head of the arrows used to represent the response options on the map. |
expansion |
The factor of expansion applied to response options coordinates to increase readability. |
title |
An optional title to be added to the plot. |
... |
further arguments passed to or from other methods. |
alpha.total.bootstrap.test: Categories non-significantly different at the alpha risk of alpha.total.bootstrap.test according to the total bootstrap test are linked by a line on the plot. If these links are not required, alpha.total.bootstrap.test can be set to 1.
A MR-CA factor map.
nb.obs=200 nb.response=5 nb.category=5 vec.category=paste("C",1:nb.category,sep="") right=matrix(rbinom(nb.response*nb.obs,1,0.25),nb.obs,nb.response) category=sample(vec.category,nb.obs,replace = TRUE) dset=cbind.data.frame(category,right) dset$category=as.factor(dset$category) res=mrCA(dset) plot(res)nb.obs=200 nb.response=5 nb.category=5 vec.category=paste("C",1:nb.category,sep="") right=matrix(rbinom(nb.response*nb.obs,1,0.25),nb.obs,nb.response) category=sample(vec.category,nb.obs,replace = TRUE) dset=cbind.data.frame(category,right) dset$category=as.factor(dset$category) res=mrCA(dset) plot(res)
This function plots the results coming from sensory.mr.sig.cell.
## S3 method for class 'sensory.mr.sig.cell' plot( x, alpha.1 = 0.05, alpha.2 = 0, choice = "percent.derived.cont", col.greater.1 = "green3", col.lower.1 = "orangered", col.greater.2 = "lightgreen", col.lower.2 = "lightsalmon", ... )## S3 method for class 'sensory.mr.sig.cell' plot( x, alpha.1 = 0.05, alpha.2 = 0, choice = "percent.derived.cont", col.greater.1 = "green3", col.lower.1 = "orangered", col.greater.2 = "lightgreen", col.lower.2 = "lightsalmon", ... )
x |
A list returned by |
alpha.1 |
The alpha risk to consider the tests as significant. |
alpha.2 |
The alpha risk to consider the tests as showing a trend. If trends are not to be considered, alpha.2 can be set to 0 (Default). |
choice |
Which table from res should be plotted? Default is percent.derived.cont. |
col.greater.1 |
The color used to highlight significant positive associations. |
col.lower.1 |
The color used to highlight significant negative associations. |
col.greater.2 |
The color used to highlight positive associations showing a trend. |
col.lower.2 |
The color used to highlight negative associations showing a trend. |
... |
further arguments passed to or from other methods. |
A table with cells highlighted.
data(milkchoc) dim.sig=sensory.mr.dimensionality.test(milkchoc)$dim.sig res=sensory.mr.sig.cell(milkchoc,nbaxes.sig=dim.sig) plot(res)data(milkchoc) dim.sig=sensory.mr.dimensionality.test(milkchoc)$dim.sig res=sensory.mr.sig.cell(milkchoc,nbaxes.sig=dim.sig) plot(res)
This function plots the results coming from sensory.mrCA.
## S3 method for class 'sensory.mrCA' plot( x, axes = c(1, 2), alpha.total.bootstrap.test = 0.05, alpha.ellipse = alpha.total.bootstrap.test, select.desc = rownames(x$desc.coord), rev.x = FALSE, rev.y = FALSE, size.points = 3.5, size.lab = 6, size.head.arrow = 0.4, expansion = 1.25, title = NULL, ... )## S3 method for class 'sensory.mrCA' plot( x, axes = c(1, 2), alpha.total.bootstrap.test = 0.05, alpha.ellipse = alpha.total.bootstrap.test, select.desc = rownames(x$desc.coord), rev.x = FALSE, rev.y = FALSE, size.points = 3.5, size.lab = 6, size.head.arrow = 0.4, expansion = 1.25, title = NULL, ... )
x |
A list returned by |
axes |
Which dimensions of the MR-CA should be plotted? |
alpha.total.bootstrap.test |
The alpha risk of the total bootstrap tests. See details. |
alpha.ellipse |
The alpha risk of the confidence ellipses. |
select.desc |
A character vector specifying the descriptors to plot. By default, all descriptors are plotted. |
rev.x |
Should the horizontal plotted dimension be reversed? Useful in case of map comparisons to align products. |
rev.y |
Should the vertical plotted dimension be reversed? Useful in case of map comparisons to align products. |
size.points |
The size of the points used to represent the products on the map. |
size.lab |
The size of the label on the map. |
size.head.arrow |
The size of the head of the arrows used to represent the descriptors on the map. |
expansion |
The factor of expansion applied to descriptors coordinates to increase readability. |
title |
An optional title to be added to the plot. |
... |
further arguments passed to or from other methods. |
alpha.total.bootstrap.test: products non-significantly different at the alpha risk of alpha.total.bootstrap.test according to the total bootstrap test are linked by a line on the plot. If these links are not required, alpha.total.bootstrap.test can be set to 1.
A MR-CA factor map
data(milkchoc) dim.sig=sensory.mr.dimensionality.test(milkchoc)$dim.sig res=sensory.mrCA(milkchoc,nbaxes.sig=dim.sig) plot(res)data(milkchoc) dim.sig=sensory.mr.dimensionality.test(milkchoc)$dim.sig res=sensory.mrCA(milkchoc,nbaxes.sig=dim.sig) plot(res)
Performs a multiple-response dimensionality test as defined in Mahieu, Schlich, Visalli, and Cardot (2021) using random permutations to estimate the null distribution. The difference with mr.dimensionality.test is that random permutations are performed within subjects rather than along all evaluations.
sensory.mr.dimensionality.test(data, nperm = 300, alpha = 0.05)sensory.mr.dimensionality.test(data, nperm = 300, alpha = 0.05)
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. |
nperm |
Number of permuted datasets to estimate the distribution of the statistic under the null hypothesis. See details. |
alpha |
The alpha risk of the test. |
nperm: The distribution of the statistic under the null hypothesis of no associations between products and descriptors is estimated using nperm datasets generated thanks to random permutations of the response vectors along products within subjects.
A list with the following elements:
The number of significant dimensions
Observed multiple-response chi-square statistic of each dimension
P-value of the test of each dimension adjusted for closed testing procedure
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) sensory.mr.dimensionality.test(milkchoc)data(milkchoc) sensory.mr.dimensionality.test(milkchoc)
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 = 300, nbaxes.sig = Inf, two.sided = TRUE)sensory.mr.sig.cell(data, nsample = 300, 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)data(milkchoc) dim.sig=sensory.mr.dimensionality.test(milkchoc)$dim.sig res=sensory.mr.sig.cell(milkchoc,nbaxes.sig=dim.sig) plot(res)
This function performs the MR-CA of the data as well as the total bootstrap procedure (Cadoret & Husson, 2013) and the pairwise total bootstrap tests as proposed in Castura et al. (2023). The difference with mrCA used with ellipse=TRUE is that the total bootstrap procedure is stratified with respect to subjects in sensory.mrCA.
sensory.mrCA(data, nboot = 300, nbaxes.sig = Inf)sensory.mrCA(data, nboot = 300, nbaxes.sig = Inf)
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. |
nboot |
The number of bootstrapped panel of the total bootstrap procedure. |
nbaxes.sig |
The number of significant axes returned by |
nbaxes.sig: The number of significant axes determines the number of axes accounted for while performing the Procrustes rotations of the total bootstrap procedure (Mahieu, Schlich, Visalli, & Cardot, 2021). These same axes are accounted for the pairwise total bootstrap tests.
A list with the following elements:
Eigenvalues of the MR-CA and their corresponding percentages of inertia
Products coordinates
Descriptors coordinates
Results of the singular value decomposition
Coordinates of the rotated bootstrap replicates
P-values of the pairwise total bootstrap tests
Cadoret, M., & Husson, F. (2013). Construction and evaluation of confidence ellipses applied at sensory data. Food Quality and Preference, 28(1), 106-115.
Castura, J. C., Varela, P., & Næs, T. (2023). Evaluation of complementary numerical and visual approaches for investigating pairwise comparisons after principal component analysis. Food Quality and Preference, 107.
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.mrCA(milkchoc,nbaxes.sig=dim.sig) plot(res)data(milkchoc) dim.sig=sensory.mr.dimensionality.test(milkchoc)$dim.sig res=sensory.mrCA(milkchoc,nbaxes.sig=dim.sig) plot(res)