agplot.corregp: Plotting an Association Graph for Correspondence Regression

Description Usage Arguments Details Value See Also Examples

Description

Function to make an association graph of the (significant) coordinate scores in correspondence regression.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## S3 method for class '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 class '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, ...)

Arguments

x

The output of a call to corregp (i.e. an object of class "corregp").

axes

The axes for which to plot the association graph: a vector of indices. Defaults to all the axes.

ysub

Vector of indices to select a subset of the Y levels.

xsub

Vector of indices to select a subset of the X levels. Can also be "all" or "both" (or abbreviations).

sort

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.

na.rm

Logical specifying whether to omit NA coordinates from the plot. Defaults to FALSE.

col

Color of the association graph: either numeric or see colors.

cex

Character expansion factor: a number to specify the size of the text labels.

font

Font of the text labels (levels): 1 for plain, 2 for bold, 3 for italic, and 4 for bold italic. Defaults to 1.

family

Font family of the text labels (levels): can be "serif", "sans", "mono" or one of the Hershey fonts.

lwd

Line width of the association graph: a number to specify the line width.

lty

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.

ycol

Color of the levels in Y: either numeric or see colors.

xcol

Color of the levels in X: either numeric or see colors.

ncol

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.

nwid

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.

lcol

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.

lwid

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.

pcol

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.

ppos

Relative position of the pointer (arrow head): a vector of values between 0 and 1 for each axis.

ptyp

Type of of the pointer (arrow head): can be "simple", "curved", "triangle", "circle", "ellipse" or "T". Defaults to "simple".

zoom

Zoom factor of the association graph. Defaults to 1.

hshft

Horizontal shift of the association graph. Defaults to 0.

vshft

Vertical shift of the association graph. Defaults to 0.

main

The main title of the association graph.

cl

The confidence level for the confidence intervals. Defaults to 0.95.

nq

Logical specifying whether to use a normal quantile (i.e. apply qnorm) in the computation of the confidence interval. Defaults to TRUE. If FALSE, then the confidence interval is computed directly with the quantile function.

digits

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.

Details

Association graphs (of a corregp output) in the corregp package make use of various functionalities of the package diagram.

Value

A plot window containing the association graph.

See Also

corregp, cint.corregp, pcplot.corregp, plot3d.corregp.

Examples

1
2
3
4
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"))

corregp documentation built on May 1, 2019, 10:08 p.m.