Function to make an association graph of the (significant) coordinate scores in correspondence regression.
# S3 method for corregp
agplot(x, axes = NULL, ysub = NULL, xsub = NULL,
sort = NULL, na.rm = FALSE, col = "black", cex = par("cex"),
font = par("font"), family = par("family"), lwd = par("lwd"),
lty = par("lty"), ycol = col, xcol = col, ncol = c("white",
"lightgray"), nwid = lwd, lcol = col, lwid = lwd, pcol = lcol,
ppos = NULL, ptyp = "simple", zoom = 1, hshft = 0, vshft = 0,
main = NULL, cl = 0.95, nq = TRUE, digits = 2, ...)# S3 method for corregp
plotag(x, axes = NULL, ysub = NULL, xsub = NULL,
sort = NULL, na.rm = FALSE, col = "black", cex = par("cex"),
font = par("font"), family = par("family"), lwd = par("lwd"),
lty = par("lty"), ycol = col, xcol = col, ncol = c("white",
"lightgray"), nwid = lwd, lcol = col, lwid = lwd, pcol = lcol,
ppos = NULL, ptyp = "simple", zoom = 1, hshft = 0, vshft = 0,
main = NULL, cl = 0.95, nq = TRUE, digits = 2, ...)
agplot(x, ...)
plotag(x, ...)
The output of a call to corregp (i.e. an object of class "corregp").
The axes for which to plot the association graph: a vector of indices. Defaults to all the axes.
Vector of indices to select a subset of the Y levels.
Vector of indices to select a subset of the X levels. Can also be "all" or "both" (or abbreviations).
Vector of axes for which to sort the coordinate scores. The default (NULL) plots all levels in the order in which they appear in the
correspondence regression x.
Logical specifying whether to omit NA coordinates from the plot. Defaults to FALSE.
Color of the association graph: either numeric or see colors.
Character expansion factor: a number to specify the size of the text labels.
Font of the text labels (levels): 1 for plain, 2 for bold, 3 for italic, and 4 for bold italic. Defaults to 1.
Font family of the text labels (levels): can be "serif", "sans", "mono" or one of the Hershey fonts.
Line width of the association graph: a number to specify the line width.
Line type of the association graph (i.e. linking edges): 0 or "blank", 1 or "solid", 2 or "dashed",
3 or "dotted", 4 or "dotdash", 5 or "longdash", 6 or "twodash". Defaults to 1.
Color of the levels in Y: either numeric or see colors.
Color of the levels in X: either numeric or see colors.
Fill color of the nodes: either numeric or see colors. Defaults to c("white","lightgray"): the first value
is for the nodes of the axes and the second value is for the nodes of the X and Y levels.
Line width of the nodes: a number to specify the line width. If a vector of two values is specified, then the first width is for the nodes of the axes and the second width is for the nodes of the X and Y levels.
Color of the links (edges): either numeric or see colors. If a vector of two values is specified, then
the first color is for the scores > 0 and the second color is for the scores < 0.
Line width of the links (edges): a number to specify the line width. If a vector of two values is specified, then the first width is for
the scores > 0 and the second width is for the scores < 0.
Color of the pointer (arrow head): either numeric or see colors. If a vector of two values is specified, then
the first color is for the scores > 0 and the second color is for the scores < 0.
Relative position of the pointer (arrow head): a vector of values between 0 and 1 for each axis.
Type of of the pointer (arrow head): can be "simple", "curved", "triangle", "circle", "ellipse" or
"T". Defaults to "simple".
Zoom factor of the association graph. Defaults to 1.
Horizontal shift of the association graph. Defaults to 0.
Vertical shift of the association graph. Defaults to 0.
The main title of the association graph.
The confidence level for the confidence intervals. Defaults to 0.95.
Integer specifying the number of decimals for the scores as labels of the links (edges). Defauls to 2.
Further arguments passed to or from other methods.
A plot window containing the association graph.
Association graphs (of a corregp output) in the corregp package make use of various functionalities of the package diagram.
# NOT RUN {
data(HairEye)
haireye.crg <- corregp(Eye ~ Hair * Sex, data = HairEye, b = 3000)
agplot(haireye.crg, axes = 1:2, xsub = c("Hair", "Sex"))
plotag(haireye.crg, axes = 1:2, xsub = c("Hair", "Sex"))
# }
Run the code above in your browser using DataLab