Learn R Programming

CAvariants (version 5.0)

plot.CAvariants: Main plot function

Description

This function allows the analyst to produce the suitable graphical displays with respect to the six variants of correspondence analysis. In particular when plottype = "classic", it produces classical graphical displays for catype = "CA" and catype = "NSCA", where the row and column variables are graphically depicted in principal coordinates. When we set plottype = "biplot", it produces biplot graphical displays, or polynomial biplots in case of ordered analysis. Notice that for ordered analysis only polynomial biplots are suitable. In particular, for the singly ordered variants only row isometric polynomial biplots make sense, as we assume that the ordered variable is the column variable (the column coordinates are standard polynomial coordinates and the row coordinates are principal polynomial coordinates). When the input parameter catype concerns an ordered variant of CA, then the input parameter plottype should be equal to plottype = "biplot", if biptype = "row", it will give back a row isometric polynomial biplot.

Usage

# S3 method for CAvariants
plot(x, firstaxis = 1, lastaxis = 2, cex = 0.8, 
cex.lab = 0.8, prop = 1,  plottype = "biplot", biptype = "row",  
scaleplot = 1, posleg = "topleft", pos = 2, ell = FALSE, Mell = x$Mell, 
alpha = 0.05,  size=5,adj=c(0,0.5),…)

Arguments

x

The name of the output object, for example say res, used with the main function CAvariants.

firstaxis

The horizontal polynomial or principal axis, firstaxis. By default, firstaxis = 1.

lastaxis

The vertical polynomial or principal axis, lastaxis. By default, lastaxis = 2.

cex

The size of characters, cex, displayed on the correspondence plot or biplot. By default, cex = 0.8.

cex.lab

The parameter cex.lab that specifies the size of character labels of axes in graphical displays. By default, cex.lab = 0.8.

prop

The scaling parameter for specifying the limits of the plotting area. By default, prop = 1.

plottype

The type of graphical display required (either a classical correspondence plot or a biplot). The user can look at a classical correspondence plot by defining the input parameter plottype = "classic". When plottype = "biplot", it produces biplot graphical displays, or polynomial biplots in case of an ordered analysis.

Note that for ordered analysis only polynomial biplots are suitable. In particular for the singly ordered variants, only row isometric polynomial biplots make sense, as we assume that the ordered variable is the column variable (the column coordinates are standard polynomial coordinates and the row coordinates are principal polynomial coordinates). By default, plottype = "biplot".

biptype

For a biplot, one may specify that it be a row-isometric biplot (biptype = "row") or a column-isometric biplot (biptype = "column"). This feature is available for the nominal symmetrical and the non symmetrical correspondence analyses. By default, a row-isometric biplot, biptype = "row", is produced.

scaleplot

The parameter for scaling the biplot coordinates, scaleplot, originally proposed in Section 2.3.1 of Gower et al. (2011) and described on page 135 of Beh and Lombardo (2014). By default, scaleplot = 1.

posleg

The parameter posleg for specifying the position of the legend when portraying trends of ordered categories in ordered variants of correspondence analysis. By default, posleg = "topleft".

pos

The parameter for specifying the position of point symbols in the graphical displays. By default, pos = 2.

ell

The logical parameter, ell which specifies whether algebraic confidence ellipses are to be included in the plot or not. Setting the input parameter to ell = TRUE will allow the user to assess the statistical significance of each category to the association between the variables. The ellipses will be included when the plot is constructed using principal coordinates (being either row and column principal coordinates or row and column principal polynomial coordinates). By default, this input parameter is set to ell = FALSE. See also the input parameter ellcomp of the function CAvariants for a description of the numeric characteristics of the confidence ellipses (eccentricity, area, etc.), as well as the input parameter ellprint of the function print.CAvariants for getting a print of these parameters.

Mell

The number of axes Mell considered when portraying the elliptical confidence regions. By default, it is equal to Mell = min(nrow(Xtable), ncol(Xtable)) - 1, i.e. the rank of the data matrix. This parameter is identical to the input parameter Mell of the function CAvariants.

alpha

The confidence level of the elliptical regions. By default, alpha = 0.05.

size

The size of the plotting area.

adj

one or two values in [0, 1] which specify the x (and optionally y) adjustment of the labels.

Further arguments passed to or from other methods.

Details

It produces classical and biplot graphical displays. Further when catype is equal to "DOCA", "SOCA", "DONSCA" or "SONSCA", the trend of row and column variables after the reconstruction of column profiles by polynomials is portrayed. For classical biplot displays, it superimposes on it algebraic ellipses of confidence. It uses the secondary plot functions caellipse or nscaellipse, depending on the input parameter catype.

References

Beh EJ and Lombardo R 2014 Correspondence Analysis: Theory, Practice and New Strategies. John Wiley & Sons. Gower J, Lubbe S, and le Roux, N 2011 Understanding Biplots. John Wiley & Sons. Lombardo R Beh EJ 2016 Variants of Simple Correspondence Analysis. The R Journal, 8 (2), 167--184. Lombardo R Beh EJ and Kroonenberg PM 2016 Modelling Trends in Ordered Correspondence Analysis Using Orthogonal Polynomials. Psychometrika, 81(2), 325--349.

Examples

Run this code
# NOT RUN {
data(asbestos)
risasbestos<-CAvariants(asbestos, catype = "CA") 
plot(risasbestos, plottype = "classic")
plot(risasbestos, plottype = "biplot", biptype = "row", ell = TRUE)
# }

Run the code above in your browser using DataLab