# plot_interaction: Plot the rows and columns of the contingency table in the... In genevievelrobin/lori: Low-rank Interaction Contingency Tables (Title Case)

## Description

Plot the rows and columns of the contingency table in the Euclidean space defined by two of the first principal directions of the interaction matrix Theta. Theta corresponds to the interaction remaining after discarding the effects of the covariates. The interpretation is the following. A row and a column that are close in Euclidean distance interact highly. Two rows or two columns that are close in Euclidean distance have similar profiles.

## Usage

 1 2 3 4 5 6 7 8 9 plot_interaction(theta, quanti.sup = NULL, axes = c(1, 2), xlim = NULL, ylim = NULL, invisible = c("none", "row", "col", "row.sup", "col.sup", "quali.sup"), choix = "CA", col.row = "blue", col.col = "red", col.row.sup = "darkblue", col.col.sup = "darkred", col.quanti.sup = "blue", label = c("all", "none", "row", "row.sup", "col", "col.sup", "quali.sup"), title = NULL, palette = NULL, autoLab = c("auto", "yes", "no"), new.plot = FALSE, selectRow = NULL, selectCol = NULL, unselect = 0.7, shadowtext = FALSE, habillage = "none", legend = list(bty = "y", x = "topleft"), ...)

## Arguments

 theta An interaction matrix (\$Theta in output from the application of the lori function). Theta can have extra columns corresponding to supplementary quantitative variables quanti.sup a vector of column indices giving the column indices of the supplementary quantitative variables if there are some. axes a vector of integers of length two, indicating which axes to plot (c(1,2) means that the first two directions are plotted). xlim a vector of length two indicating the limits of the plot abscissa. ylim a vector of length two indicating the limits of the plot ordinate. invisible string indicating if some points should be unlabelled ("row", "col", "row.sup", "col.sup","quali.sup") choix the graph to plot ("CA" for the CA map, "quanti.sup" for the supplementary quantitative variables) col.row a color for the rows points col.col a color for columns points col.row.sup a color for the supplementary rows points col.col.sup a color for supplementary columns points col.quanti.sup a color for the supplementary quantitative variables label a list of character for the elements which are labelled (by default, all the elements are labelled ("row", "row.sup", "col", "col.sup","quali.sup") title string corresponding to the title of the graph you draw (by default NULL and a title is chosen) palette the color palette used to draw the points. By default colors are chosen. If you want to define the colors : palette=palette(c("black","red","blue")); or you can use: palette=palette(rainbow(30)), or in black and white for example: palette=palette(gray(seq(0,.9,len=25))) autoLab if autoLab="auto", autoLab is equal to "yes" if there are less than 50 elements and "no" otherwise; if "yes", the labels of the drawn elements are placed in a "good" way (can be time-consuming if many elements), and if "no" the elements are placed quickly but may overlap new.plot boolean, if TRUE, a new graphical device is created selectRow a selection of the rows that are drawn; see the details section selectCol a selection of the columns that are drawn; see the details section unselect may be either a value between 0 and 1 that gives the transparency of the unselected objects (if unselect=1 the transparceny is total and the elements are not drawn, if unselect=0 the elements are drawn as usual but without any label) or may be a color (for example unselect="grey60") shadowtext boolean; if true put a shadow on the labels (rectangles are written under the labels which may lead to difficulties to modify the graph with another program) habillage color the individuals among a categorical variable (give the number of the categorical supplementary variable or its name) legend a list of arguments that defines the legend if needed (when individuals are drawn according to a variable); see the arguments of the function legend ... further arguments passed to or from other methods, such as cex, cex.main, ...

## Examples

 1 2 3 4 X = matrix(rnorm(rep(0, 15)), 5) Y <- matrix(rpois(length(c(X)), exp(c(X))), 5) res_lori <- lori(Y) p <- plot_interaction(res_lori\$Theta)

genevievelrobin/lori documentation built on April 2, 2018, 7:30 p.m.