This function is designed to point out the variables that are the most characteristic according to the set of products in its whole, and to each of the products in particular.
This function is designed to test the main effect of a categorical variable (F-test) and the significance of its coefficients (T-test) for a set of endogenous variables and a given analysis of variance model. In most cases, the main effect is the product effect and the endogenous variables are the sensory descriptors.
donnee: a data frame made up of at least two qualitative variables (product, panelist) and a set of quantitative variables (sensory descriptors)
formul: the model that is to be tested
firstvar: the position of the first endogenous variable
lastvar: the position of the last endogenous variable (by default the last column of donnee)
proba: the significance threshold considered for the analyses of variance (by default 0.05)
graph: a boolean, if TRUE a barplot of the P-values associated with the F-test of the product effet is displayed
col.lower: the color used for 'level.lower'. Only useful if graph is TRUE
col.upper: the color used for 'upper.lower'. Only useful if graph is TRUE
nbrow: the number of rows to be displayed (by default, all the values are displayed). Only useful if graph is TRUE
nbcol: the number of columns to be displayed (by default, all the values are displayed). Only useful if graph is TRUE
random: boolean, effect should be possible as fixed or random (default as random)
Details
The formul parameter must be filled in by an analysis of variance model and must begin with the categorical variable of interest (e.g. the product effect) followed by the different other factors of interest (and their combinations). E.g.:formul = "~Product+Panelist+Session".
Returns
A list containing the following elements: - tabF: the V-test and the P-value of the F-test for each descriptor resulting from the analysis of variance model
tabT: a (products,descriptors) data frame, in which each cell is the Vtest for a given product and a given descriptor
coeff: a (products,descriptors) data frame, in which each cell is the coefficient resulting from the analysis of variance model for a given product and a given descriptor
resF: the V-test and the P-value for each descriptor resulting from the analysis of variance model, sorted in ascending order
resT: a list which elements are data frames, one data frame per product: the coefficient, the P-value and the Vtest for each significant descriptor resulting from the analysis of variance model, sorted in descending order
adjmean: a (products,descriptors) data frame, in which each cell is the adjusted mean resulting from the analysis of variance model for a given product and a given descriptor
A barplot of the P-values associated with the F-test of the product effet.
A colored table with the adjusted means of the categorical variable: the values significantly different from the general mean are colored (significantly different with the proba level); the significantly less are colored in red (by default) and the significantly great are colored in blue.
References
P. Lea, T. Naes, M. Rodbotten. Analysis of variance for sensory data.
H. Sahai, M. I. Ageel. The analysis of variance.
Author(s)
Francois Husson
See Also
aov
Examples
### Example 1data(chocolates)## model (AOV): " descriptor = product + panelist "resdecat<-decat(sensochoc, formul="~Product+Panelist", firstvar =5)barrow(resdecat$tabT)barrow(t(resdecat$tabT), numr =3, numc =3)barrow(resdecat$coeff, color ="orange")### Example 2data(chocolates)## model (AOV): " descriptor = product + panelist "res2 <-decat(sensochoc, formul="~Product+Panelist", firstvar =5, proba=1, graph =FALSE)