plot.i_mca: Plotting 2D maps in Multiple Correspondence Analysis

Description Usage Arguments Details References See Also Examples

View source: R/plot.i_mca.R

Description

Graphical display of Multiple Correspondence Analysis results in two dimensions

Usage

1
2
3
4
## S3 method for class 'i_mca'
plot(x, dims = c(1,2), what = c(TRUE,TRUE), 
contrib = "none", dataname = NULL, labels = NULL, animation = TRUE, 
frames = 10, zoom = TRUE, movie_format = "gif", binary = FALSE,...)

Arguments

x

Multiple correspondence analysis object returned by i_mca

dims

Numerical vector of length 2 indicating the dimensions to plot on horizontal and vertical axes respectively; default is first dimension horizontal and second dimension vertical

what

Vector of two logicals specifying the contents of the plot(s). First entry indicates if the rows (observations) are displayed in principal coordinates and the second entry if the variable categories are displayed in principal coordinates (default = c(TRUE,TRUE) and shows two separate plots and a joint plot if animation = FALSE and two separate plots if animation = TRUE)

contrib

Vector of two character strings specifying if attribute contributions should be represented by different label size. Available options are
"none" (contributions are not indicated in the plot)
"cor" (relative contributions are indicated by label size)
"ctr" (absolute contributions are indicated by label size)
The higher the contribution of a point, the larger its label size. Default is "none"

dataname

String prefix used for custom naming of output files; default is the name of the output object

labels

String vector of variable labels

animation

Logical indicating whether animated GIF or PDF files are created and saved to the hard drive or a static plot is created (default = TRUE)

frames

Number of animation frames shown per iteration (default = 10); applicable only when animation = TRUE

zoom

Logical indicating whether axis limits change during the animation creating a zooming effect; applicable only when animation = TRUE

binary

Logical indicating whether the categories associated with attribute presence are displayed on the plot; applicable only when the data are 0/1

movie_format

Specifies if the animated plot is saved in the working directory either in default = "gif" or "pdf" format

...

Further arguments passed to plot and points

Details

The function plot.i_mca makes a two-dimensional map of the object created by i_mca with respect to two selected dimensions. In this map both the row and column points are scaled to have inertias (weighted variances) equal to the principal inertia (eigenvalue or squared singular value) along the principal axes, that is both rows and columns are in pricipal coordinates.

References

Greenacre, M.J. (1993) Correspondence Analysis in Practice. London: Academic Press.
Greenacre, M.J. (1993) Biplots in Correspondence Analysis, Journal of Applied Statistics, 20, 251-269.
ImageMagick: http://www.imagemagick.org; GraphicsMagick: http://www.graphicsmagick.org

See Also

plot.i_pca

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data("women", package = "idm")
res_iMCAl = i_mca(data1 = women[1:50, 1:4], data2 = women[51:300, 1:4], 
method = "live", nchunk = 4)
#static plot, final solution
plot(res_iMCAl, contrib = "ctr", animation = FALSE)

#\donttest is used here because the code calls the saveLatex function of the animation package 
#which requires ImageMagick or GraphicsMagick and 
#Adobe Acrobat Reader to be installed in your system 
#See help(im.convert) for details on the configuration of ImageMagick or GraphicsMagick.
#Creates animated plots in PDF for objects and variables
plot(res_iMCAl, contrib = "ctr", animation = TRUE, frames = 10, movie_format = 'pdf')

idm documentation built on May 2, 2019, 9:20 a.m.

Related to plot.i_mca in idm...