interact function

Estimation of interaction coefficients

Estimation of interaction coefficients

Computes automatically the interaction coefficients between two quantitative variables col.p and col.j for the following model: "~col.p+col.j+col.p:col.j".

interact(donnee, col.p, col.j, firstvar, lastvar = ncol(donnee))

Arguments

  • donnee: a data frame made up of at least two qualitative variables (product, panelist) and a set of quantitative variables (sensory descriptors)
  • col.p: the position of the product effect for instance
  • col.j: the position of the panelist effect for instance
  • firstvar: the position of the first endogenous variable
  • lastvar: the position of the last endogenous variable (by default the last column of donnee)

Details

In most cases col.p represents the product effect, col.j represents the panelist effect, and the variables of interest are the sensory descriptors. The model considered is the following one: "~Product+Panelist+Product:Panelist".

Data must be complete (but not necessarily balanced).

Returns

Returns an array of dimension (p,j,k), where p is the number of products, j the number of panelists and k the number of sensory descriptors. The entries of this array are the interaction coefficients between a panelist and a product for a given descriptor.

For each sensory descriptor, returns a graph where each (panelist,product) interaction coefficient is displayed, a graph where the contribution to the (panelist,product) interaction coefficient by product is displayed, a graph where the contribution to the (panelist,product) interaction coefficient by panelist is displayed.

Author(s)

Francois Husson

See Also

aov

Examples

## Not run: data(chocolates) resinteract=interact(sensochoc, col.p = 4, col.j = 1, firstvar = 5) ## End(Not run)