Description Usage Arguments Details Value Author(s) References See Also Examples

Returns the (products,descriptors) matrix with entries the means over panelists and sessions.

Computes analyses of variance automatically for a given model and a set of quantitative variables.
Returns a data matrix where each row is associated with each
category of a given categorical variable (in most cases, the categorical variable is the
*product* variable), each column is associated with a quantitative variable, and each cell is
the corresponding adjusted mean or mean.

Computes the average data table with respect to a categorical variable and a set
of quantitative variables.

1 2 |

`donnee` |
a data frame made up of at least two qualitative variables
( |

`formul` |
the model with respect to which the factor levels of the categorical variable of interest are calculated |

`subset` |
an optional vector specifying a subset of observations to be used in the fitting process |

`method` |
two possibilities, "coeff" (by default) or "mean" |

`firstvar` |
the position of the first endogenous variable |

`lastvar` |
the position of the last endogenous variable (by default the last column of |

`file` |
the name of the output file (by default, NULL and results are not in a file) |

The `formul`

parameter can be filled in for a given analysis of variance model.
The `formul`

parameter must begin with the categorical variable of interest (generally the *product* variable)
followed by the different other factors (and eventually their interactions) of interest. Classicially, one can used
`formul = "~Product+Panelist+Product:Panelist"`

.
In practise and in our type of applications, this function is very useful to obtain a data matrix
in which rows represent products and columns represent sensory descriptors.

If "mean" is assigned to the `method`

parameter, then the `formul`

parameter
can be restricted to the sole variable of interest (generally the *product* variable).

If data are balanced, the two options "mean" and "coeff" give the same results.

Return a matrix of dimension (*p,q*), where *p* is the number of categories of the qualitative variable
of interest (in most cases, *p* is the number of products)
and *q* is the number of (sensory) descriptors. If "coeff" is assigned to the
`method`

parameter then the function *averagetable* returns the matrix
of the adjusted means; if "mean" is assigned to the `method`

parameter
then the function averagetable returns the matrix of the means per category.

Francois Husson [email protected]

P. Lea, T. Naes, M. Rodbotten. *Analysis of variance for sensory data*.

H. Sahai, M. I. Ageel. *The analysis of variance*.

1 2 3 4 5 6 7 | ```
data(chocolates)
resaverage<-averagetable(sensochoc, formul = "~Product+Panelist",
firstvar = 5)
coltable(magicsort(resaverage), level.upper = 6,level.lower = 4,
main.title = "Average by chocolate")
res.pca = PCA(resaverage, scale.unit = TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.