PLOT.CA: Plot the results of a correspondence analysis

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

View source: R/PLOT.CA.r

Description

Various maps and biplots of the results of a correspondence analysis using function CA.

Usage

1
2
PLOT.CA(obj, map="symmetric", rescale=1, dim=c(1,2), axes.inv = c(1,1), main="",
        cols=c("blue","red"), colarrows = "pink", cexs=c(0.8,0.8), fonts=c(2,4))

Arguments

obj

A CA object created using function CA

map

Choice of scaling of rows and columns: "symmetric" (default), "asymmetric" or "contribution"

rescale

A rescaling factor applied to column coordinates (default is 1 for no rescaling)

dim

Dimensions selected for horizontal and vertical axes of the plot (default is c(1,2))

main

Title for plot

axes.inv

Option for reversing directions of horizontal and vertical axes (default is c(1,1) for no reversing, change one or both to -1 for reversing)

cols

Colours for row and column labels (default is c("blue","red"))

colarrows

Colour for arrows in asymmetric and contribution biplots (default is "pink")

cexs

Character expansion factors for row and column labels (default is c(0.8,0.8))

fonts

Fonts for row and column labels (default is c(2,4))

Details

The function PLOT.CA makes a scatterplot of the results of a correspondence analysis (computed using function CA), with various options for scaling the results and changing the direction of the axes. By default, dimensions 1 and 2 are plotted on the horizontal and vertical axes, and it is assumed that row points refer to samples and columns to variables.

By default, the symmetric scaling is used, where both rows and columns are in principal coordinates and have the same amount of weighted variance (i.e. inertia) along the two dimensions. The other options are biplots: the asymmetric option, when columns are in standard coordinates, and the contribution option, when columns are in contribution coordinates. In cases where the row and column displays occupy widely different extents, the column coordinates can be rescaled using the rescale option.

Author(s)

Michael Greenacre

References

Greenacre, M. (2013), Contribution biplots, Journal of Computational and Graphical Statistics, 22, 107-122.

See Also

CA, plot.ca

Examples

1
2
3
4
5
6
data(cups)
cups.CA <- CA(cups)
PLOT.CA(cups.CA, map="contribution", rescale=0.2)	
# Compare the above plot with that of an LRA -- practically the same
cups.LRA <- LRA(cups)
PLOT.LRA(cups.LRA, map="contribution", rescale=0.2)

Example output

Loading required package: ca
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-7
Loading required package: ellipse

Attaching package:ellipseThe following object is masked frompackage:graphics:

    pairs

easyCODA documentation built on Jan. 15, 2022, 3 a.m.