plot.anacor {anacor}R Documentation

2-D and 3D plots for anacor solution

Description

These functions produce various 2- and 3-dimensional plots for objects of class "anacor"

Usage

## S3 method for class 'anacor':
plot(x, plot.type, plot.dim = c(1,2), legpos = "top", arrows = FALSE, conf = 0.95, 
wlines = 0, xlab, ylab, main, type, xlim, ylim, cex.axis2, ...)

## S3 method for class 'anacor':
plot3d(x, plot.type, plot.dim = c(1,2,3), col.r = "RED", col.c = "BLUE", arrows = TRUE, xlab, ylab, zlab, 
main, ...)

## S3 method for class 'anacor':
plot3dstatic(x, plot.type, plot.dim = c(1,2,3), col.r = "RED", col.c = "BLUE", arrows = TRUE, main, xlab, ylab, zlab, 
xlim, ylim, zlim, ...)

Arguments

x Object of class "anacor".
plot.type Type of plot to be produced (details see below): 2-D and 3-D for "jointplot", "rowplot", and "colplot"; 2-D for "regplot", "graphplot", "benzplot", "transplot", and "orddiag".
plot.dim Vector of length 2 with Dimensions to be plotted. For "regplot" a single value should be provided, for "transplot" more than two dimensions are allowed, and for "benzplot" this argument is ignored.
legpos Position of the legend (for "transplot" only)
conf Ellipsoid confidence level for "jointplot", "rowplot", and "colplot". If NULL, no ellipsoids are drawn.
arrows If TRUE the points in "jointplot", "rowplot", and "colplot" are connected with the origin.
wlines For "graphplot" only: If 0, all lines are of the same thickness. For values > 0 line thickness indicates the strength of the pull
col.r Color for row score plots
col.c Color for column score plots
xlab Label x-axis.
ylab Label y-axis.
zlab Label z-axis.
xlim Scale x-axis.
ylim Scale y-axis.
zlim Scale z-axis.
main Plot title.
type Whether points, lines or both should be plotted; for "regplot" and "transplot" only.
cex.axis2 For "regplot" only. The magnification to be used for the category labels in the scaled solution relative to the current setting of cex.
... Additional graphical parameters.

Details

The following plot types are provided: "jointplot" plots row and column scores into the same device, "rowplot" and "colplot" plot the row scores and column scores, respectively, in separate devices. For these types of plots 3-dimensional versions are provided. The graph plot is an unlabeled version of the joint plot where the points are connected by lines. Options are provided (wlines) to steer the line thickness indicating the connection strength.

The regression plot ("regplot") provides two plots. First, the unscaled solution is plotted. A frequency grid for the row categories (x-axis) and column categories (y-axis) is produced. The regression line is based on the category weighted means of the relative frequencies: the blue line on the column-wise means on the x-axis and the column category on the y-axis, the red line is based on the row categories on the x-axis and the row-wise means on the y-axis. In a second device the scaled solution is plotted. The frequency grid is determined by the row scores (x-axis) and the column scores(y-axis). Now, instead of the row/column categories, the column scores (black line y-axis) and the row scores (red line x-axis) are used.

The transformation plot ("transplot") plots the row/column categories against the row/column scores. The Benzecri plot ("benzplot") plots the observed distances against the fitted distances. It is assumed that the CA result is Benzecri scaled. The ordination diagram ("orddiag") for CCA produces a joint plot and includes the column and row covariates based on intraset correlations.

Author(s)

Jan de Leeuw, Patrick Mair

References

de Leeuw, J., & Mair, P. (2007). Simple and canonical correspondence analysis using the R package anacor. Preprint available at http://gifi.stat.ucla.edu/anacor.pdf

See Also

anacor

Examples


##Regression plots using Glass data
data(glass)
res <- anacor(glass)
plot(res, plot.type = "regplot", xlab = "fathers occupation", ylab = "sons occupation")

## Benzecri Plots for bitterling data
data(bitterling)
res1 <- anacor(bitterling, ndim = 2, scaling = c("Benzecri", "Benzecri"))
res2 <- anacor(bitterling, ndim = 5, scaling = c("Benzecri", "Benzecri"))
res2
plot(res1, plot.type = "benzplot", main = "Benzecri Distances (2D)")
plot(res2, plot.type = "benzplot", main = "Benzecri Distances (5D)")

## Column score plot,transformation plot, and ordination diagram for canonical CA
data(maxwell)
res <- anacor(maxwell$table, row.covariates = maxwell$row.covariates, scaling = c("Goodman", "Goodman"))
res
plot(res, plot.type = "colplot", xlim = c(-1.5,1), conf = NULL)
plot(res, plot.type = "transplot", legpos = "topright")
plot(res, plot.type = "orddiag")

[Package anacor version 0.9-8 Index]