plot.mpm {mpm}R Documentation

Spectral Map Plot of Multivariate Data

Description

Produces a spectral map plot (biplot) of an object of class mpm

Usage

  ## S3 method for class 'mpm':
  plot(x, 
           scale = c("singul", "eigen", "uvr", "uvc"), 
           dim = c(1, 2), zoom = rep(1, 2), 
           show.row = c("all", "position"),
           show.col = c("all", "position"),
           col.group = rep(1, length(x$col.names)),
           colors = c("orange1", "red",
             rainbow(length(unique(col.group)), start = 2/6, end = 4/6)),
           col.areas = TRUE ,
           col.symbols = c(1, rep(2, length(unique(col.group)))),
           rot = rep(-1, length(dim)), 
           labels = NULL,
           label.tol = 1, 
           lab.size = 0.725,
           col.size = 10, row.size = 10,
           do.smoothScatter = FALSE, 
           do.plot = TRUE, 
           ...)

Arguments

x object of class mpm a result of a call to mpm.
scale optional character string specifying the type of factor scaling of the biplot. This can be either \dQuote{singul} (singular value scaling), \dQuote{eigen} (eigenvalue scaling), \dQuote{uvr} (unit row-variance scaling), \dQuote{uvc} (unit column-variance scaling). The latter is of particular value when analyzing large matrices, such as gene expression data. Singular value scaling \dQuote{singul} is customary in spectral map analysis. Defaults to \dQuote{singul}.
dim optional principal factors that are plotted along the horizontal and vertical axis. Defaults to c(1,2).
zoom optional zoom factor for row and column items. Defaults to c(1,1).
show.row optional character string indicating whether all rows (\dQuote{all}) are to be plotted or just the positioned rows \dQuote{position}.
show.col optional character string indicating whether all columns (\dQuote{all}) are to be plotted or just the positioned columns \dQuote{position}.
col.group optional vector (character or numeric) indicating the different groupings of the columns, e.g. Golub.grp. Defaults to 1.
colors vector specifying the colors for the annotation of the plot; the first two elements concern the rows; the third till the last element concern the columns; the first element will be used to color the unlabeled rows; the second element for the labeled rows and the remaining elements to give different colors to different groups of columns.
col.areas logical value indicating whether columns should be plotted as squares with areas proportional to their marginal mean and colors representing the different groups (TRUE), or with symbols representing the groupings and identical size (FALSE). Defaults to TRUE.
col.symbols vector of symbols when col.areas=FALSE corresponds to the pch argument of the function plot.
rot rotation of plot. Defaults to c(-1,-1).
labels character vector to be used for labeling points on the graph; if NULL, the row names of x are used instead
label.tol numerical value specifying either the percentile (label.tol<=1)of rows or the number of rows (label.tol>1) most distant from the plot-center (0,0) that are labeled and are plotted as circles with area proportional to the marginal means of the original data.
lab.size size of identifying labels for row- and column-items as cex parameter of the text function
col.size size in mm of the column symbols
row.size size in mm of the row symbols
do.smoothScatter use smoothScatter or not instead of plotting individual points
do.plot produce a plot or not
... further arguments to eqscaleplot which draws the canvas for the plot; useful for adding a main or a custom sub

Details

Spectral maps are special types of biplots with the area of the symbols proportional to some measure, usually the row or column mean value and an identification of row- and column-items. For large matrices, such as gene expression data, where there is an abundance of rows, this can obscure the plot. In this case, the argument label.tol can be used to select the most informative rows, i.e. rows that are most distant from the center of the plot. Only these row-items are then labeled and represented as circles with their areas proportional to the marginal mean value. For the column-items it can be useful to apply some grouping specified by col.group. Examples of groupings are different pathologies, such as specified in Golub.grp

Value

An object of class plot.mpm that has the following components:

Rows a data frame with the X and Y coordinates of the rows and an indication Select of whether the row was selected according to label.tol
Columns a data frame with the X and Y coordinates of the columns

Warning

Requires the package MASS to be present

Note

value is returned invisibly, but is available for further use when an explicit assignment is made

Author(s)

Luc Wouters

References

Wouters, L., Goehlmann, H., Bijnens, L., Kass, S.U., Molenberghs, G., Lewi, P.J. (2003). Graphical exploration of gene expression data: a comparative study of three multivariate methods. Biometrics 59, 1131-1140.

See Also

mpm, summary.mpm

Examples

  # Weighted spectral map analysis
  data(Golub) # Gene expression data of leukemia patients
  data(Golub.grp) # Pathological classes coded as 1, 2, 3
  r.sma <- mpm(Golub[,1:39], row.weight = "mean", col.weight = "mean")
  # Spectral map biplot with result
  r <- plot(r.sma, label.tol = 20, scale = "uvc",
            col.group = (Golub.grp)[1:38], zoom = c(1,1.2), col.size = 5)
  Golub[r$Rows$Select, 1] # 20 most extreme genes

[Package mpm version 1.0-12 Index]