Learn R Programming

SimultAnR (version 1.1)

plot.CorrAn: Graph of Correspondence Analysis

Description

Graphical display of correspondence analysis results in two dimensions.

Usage

"plot"(x, s1 = 1, s2 = 2, screen = TRUE, oar = 1, oac = 1, ...)

Arguments

x
The output of the correspondence analysis (class 'CorrAn')
s1
Dimension to plot on horizontal axis
s2
Dimension to plot on vertical axis
screen
TRUE (all the graphs on screen) or FALSE (graphs in a file) FALSE for S-plus
oar
Output for active rows (1 = yes, 0 = no)
oac
Output for active columns (1 = yes, 0 = no)
...
Further arguments passed to or from other methods

Details

The parameters s1 = 1 and s2 = 2 indicate that the graph is given for the first two dimensions. A plot of e.g. the second and the third dimensions is obtained by setting s1 = 2 and s2 = 3. Notice that in this case the argument nd of the CorrAn function must be at least 3. If there are supplementary elements in the analysis, the plot.CorrAn function provides two graphical outputs, one for the active elements and the second one for both active and supplementary elements.

See Also

CorrAn, summary.CorrAn.

Examples

Run this code
data(shoplifting)
dataCA <- shoplifting[, 1:9]

CorrAn.out <- CorrAn(data=dataCA)

### Graphs on screen
plot(CorrAn.out, s1=1, s2=2, screen=TRUE)

### Graph on a pdf file without rows
pdf('CAGr.pdf',paper="a4r",width=12, height=9)
plot(CorrAn.out, s1=1, s2=2, screen=FALSE, oar=0)
dev.off()

Run the code above in your browser using DataLab