| plotCCA | R Documentation |
Visualize the canonical correlation solution produced by
multiUS::cancorPlus. The function displays
the first show canonical dimensions together with the corresponding
coefficients for the X and Y variable sets. You can plot either regression
coefficients (canonical weights) or canonical structure correlations, and
optionally color the printed values according to their sign and magnitude.
Variable labels can be taken from row names of ccRes$xcoef and
ccRes$ycoef, replaced with customNames, or generated
automatically when row names are missing.
plotCCA(
ccRes,
xTitle = "X",
yTitle = "Y",
inColors = TRUE,
show = NULL,
scaleLabelsFactor = 1/2,
what = "reg",
nDigits = 2,
mar = c(1, 2, 1, 1),
gapLeft = 0,
customNames = NULL
)
ccRes |
The output of |
xTitle |
Character string used as the label for the first (X) set of variables. |
yTitle |
Character string used as the label for the second (Y) set of variables. |
inColors |
Logical; should values be shown in color ( |
show |
Integer; number of canonical dimensions to display. If |
scaleLabelsFactor |
Numeric exponent controlling the size of the printed
coefficients. Label size is proportional to
|
what |
Character string specifying what should be plotted:
|
nDigits |
Integer; number of decimal places used when printing the values. |
mar |
Numeric vector of plot margins passed to
|
gapLeft |
Integer; number of empty columns inserted before the first
canonical dimension. Useful for aligning multiple plots. Default is |
customNames |
Optional named character vector or list used to relabel
variables. Names should correspond to variable names in
|
This function is called for its side effect of drawing a plot and
returns NULL invisibly.
Marjan Cugmas
tmp <- cancorPlus(
x = mtcars[, c(1, 2, 3)],
y = mtcars[, c(4, 5, 6)],
useCCApackage = TRUE
)
plotCCA(
tmp,
scaleLabelsFactor = 1/2,
what = "cor",
customNames = c("cyl" = "Cylinders")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.