Learn R Programming

SensoMineR (version 1.0)

construct.axes: Coordinates of individuals and illustrative individuals for PCA or MFA

Description

This function is especially designed to be used in a sensory data analysis context. Returns the coordinates of the products when performing either PCA or MFA and the coordinates of the "partial" products when performing MFA. Returns also the panelists' coordinates when projected as illustrative rows onto the products' space. Produces graphs of products and descriptors from the output of PCA or MFA.

Usage

construct.axes(ktableau, coord = c(1,2), scale.unit = TRUE, 
      centerbypanelist = FALSE, scalebypanelist = FALSE,
      method = "coeff")

Arguments

ktableau
a ktab made up of at least two blocks (or sets) of variables: the first block must be a two qualitative variables block with the panelist and the product variables, the others are sensory descriptors blocks used to perform an MFA
coord
a length 2 vector specifying the components to plot
scale.unit
boolean, if TRUE the descriptors are scaled to unit variance
centerbypanelist
center the data by panelist before the construction of the axes
scalebypanelist
scale the data by panelist before the construction of the axes
method
the method to replace the missing values: "average" or "coeff" (coefficients of the product variable in the anova model)

Value

  • A list containing the following elements:
  • eiga matrix with the component of the factor analysis (in row) and the eigenvalues, the inertia and the cumulative inertia for each component
  • moyenthe coordinates of the products with respect to the panel and to each panelists
  • partielthe coordinates of the partial products with respect to the panel and to each panelists
  • Returns also a correlation circle as well as a graph of individuals

Details

The input data set is an object of class ktab (i.e. a list of data frames with the same row.names in common), for which the first element of the list (i.e. the first data frame) must correspond to a 2 qualitative variables block, where the first variable refers to the panelist variable and the second to the product variable. The ouptut of this function is a list with one element when performing PCA and two elements when performing MFA. The first element is the data frame of the coordinates of the products according to the whole panel (Panelist=0) and to the panelists. The second element is the data frame of the coordinates of the "partial products" according to the whole panel (Panelist=0) and to the panelists. This function is necessary when calculating confidence ellipses for products.

References

Escofier, B. and Pag�s, J. (1990) Analyses factorielles simples et multiples: objectifs, m�thodes et interpr�tation Dunod, Paris. 1--267. Escofier, B. and Pag�s, J. (1994) Multiple factor analysis (AFMULT package). Computational Statistics and Data Analysis, 18, 121--140.

See Also

mfasenso

Examples

Run this code
data(chocolates)

## PCA (two blocks of variables)
ktab.donnee <- ktab.data.frame(cbind.data.frame(chocolates[,1], 
    chocolates[,4], chocolates[,-(1:4)]), blocks = c(2,14), 
    tabnames = c("JP","Gr1"))
axe <- construct.axes(ktab.donnee, scale.unit = TRUE)
 
## MFA (three blocks of variables)
ktab.donnee <- ktab.data.frame(cbind.data.frame(chocolates[,1],
    chocolates[,4], chocolates[,-(1:4)]), blocks = c(2,6,8),
    tabnames = c("JP","A-F","T-S"))
axe <- construct.axes(ktab.donnee, scale.unit = TRUE)

Run the code above in your browser using DataLab