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.
construct.axes(matrice, coord = c(1,2), scale.unit = TRUE, group = NULL,
name.group = NULL, centerbypanelist = FALSE, scalebypanelist = FALSE,
method = "coeff")
a data.frame made up of at least two qualitative variables (the panelist and the product variables), the others are sensory descriptors used to perform an MFA or a PCA if group = NULL
a length 2 vector specifying the components to plot
boolean, if TRUE
the descriptors are scaled to unit variance
the number of variables in each group of variables when multiple factor analysis is performed (by default this parameter equals NULL and a PCA is performed)
the names of the groups of variables when mfa is performed (if group
differs from NULL)
center the data by panelist before the construction of the axes
scale the data by panelist before the construction of the axes
the method to replace the missing values: "average" or "coeff" (coefficients of the product variable in the anova model)
A list containing the following elements:
a matrix with the component of the factor analysis (in row) and the eigenvalues, the inertia and the cumulative inertia for each component
the coordinates of the products with respect to the panel and to each panelists
the coordinates of the partial products with respect to the panel and to each panelists
The input data set is an object of class data.frame
,
for which the two first columns are qualitative variables (the first variable refers to the panelist variable
and the second to the product variable) and the others are quantitative.
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.
Escofier, B. and Pages, J. (1990) Analyses factorielles simples et multiples: objectifs, methodes et interpretation Dunod, Paris. 1--267.
Escofier, B. and Pages, J. (1994) Multiple factor analysis (AFMULT package). Computational Statistics and Data Analysis, 18, 121--140.
# NOT RUN {
## Example1: PCA
data(chocolates)
donnee <- cbind.data.frame(sensochoc[,c(1,4,5:18)])
axe <- construct.axes(donnee, scale.unit = TRUE)
## Example2: MFA (two groups of variables)
data(chocolates)
donnee <- cbind.data.frame(sensochoc[,c(1,4,5:18)])
axe <- construct.axes(donnee, group = c(6,8),
name.group = c("A-F","T-S"),scale.unit = TRUE)
# }
Run the code above in your browser using DataLab