Learn R Programming

SensoMineR (version 1.03)

decat: DEscription of CATegories

Description

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.

Usage

decat(donnee, formul, firstvar, lastvar = length(colnames(donnee)), 
    proba = 0.05, graph = TRUE)

Arguments

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

Value

  • A list containing the following elements:
  • tabFthe V-test and the P-value of the F-test for each descriptor resulting from the analysis of variance model
  • tabTa (products,descriptors) data frame, in which each cell is the Vtest for a given product and a given descriptor
  • coeffa (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
  • resFthe V-test and the P-value for each descriptor resulting from the analysis of variance model, sorted in ascending order
  • resTa 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
  • A barplot of the P-values associated with the F-test of the product effet.

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".

References

P. Lea, T. Naes, M. Rodbotten. Analysis of variance for sensory data. H. Sahai, M. I. Ageel. The analysis of variance.

See Also

aov

Examples

Run this code
data(chocolates)
## model (AOV): " descriptor = product + panelist "
resdecat<-decat(chocolates, formul="~Product+Panelist", firstvar = 5)
coltable(magicsort(resdecat$tabT), level.lower = -1.96, 
    level.upper = 1.96, main.title="Products' description")
barrow(resdecat$tabT)
barrow(t(resdecat$tabT), numr = 3, numc = 3)
barrow(resdecat$coeff, color = "orange")

Run the code above in your browser using DataLab