Displays a loading plot of a multivariate analysis.
MVA.loadplot(x, xax = 1, yax = 2, fac = NULL, set = c(12, 1, 2), space = 1, map = TRUE,
xlab = NULL, ylab = NULL, main = NULL, points = TRUE, ident = TRUE, links = TRUE,
line = TRUE, labels = NULL, main.pos = c("bottomleft", "topleft","bottomright",
"topright"), main.cex = 1.3, legend = FALSE, legend.pos = c("topleft", "topright",
"bottomleft", "bottomright"), legend.title = NULL, legend.lab = NULL, pch = 16,
cex = 1, col = 1, lwd = 1, lty = 1, drawextaxes = TRUE, drawintaxes = TRUE, xlim = NULL,
ylim = NULL)
a multivariate analysis (see Details).
the horizontal axis.
the vertical axis. This can be set to NULL
for a one-dimensional graph.
only used for one-dimensional graphs. An optional factor defining groups of variables.
variables to be displayed, when several sets are available (see Details). 12
(default) for both sets, 1
for X, 2
for Y.
variables to be displayed, when several spaces are available (see Details). space
is the number of the space to be plotted.
logical indicating if a two-dimensional (TRUE
, default) or a one-dimensional graph should be drawn. A one-dimensional graph can show loadings for one or two dimensions, both horizontally.
only used for two-dimensional graphs. Legend of the horizontal axis. If NULL
(default), automatic labels are used depending on the multivariate analysis.
legend of the vertical axis. If NULL
(default), automatic labels are used depending on the multivariate analysis.
optional title of the graph.
only used for two-dimensional graphs. If FALSE
, lines or points (see links
) are replaced with their corresponding label (defined by labels
).
logical indicating if variable names should be displayed. Only used when points=TRUE
for two-dimensional graphs.
only used for two-dimensional graphs when points=TRUE
. Logical indicating if variables should be linked to the origin of the graph. If FALSE
, points are displayed at the extremity of the segments.
only used for one-dimensional graphs when yax=NULL
. Logical indicating if loadings should be linked (default) as displayed as sticks.
only used if ident=TRUE
. Names of the variables. If NULL
(default), labels correspond to variable names found in the data used in the multivariate analysis.
only used for one-dimensional graphs. Position of the title, if main
is not NULL
. Default to "bottomleft"
.
size of the title, if main
is not NULL
.
logical indicating if a legend should be added to the graph.
position of the legend, if legend
is TRUE
. Default to "topleft"
.
optional title of the legend, if legend
is TRUE
.
legend labels, if legend
is TRUE
. If NULL
for a one-dimensional graph, dimension names are used. If NULL
for a two-dimensional graph, levels of the factor defined by fac
are used.
only used for two-dimensional graphs. Symbol(s) used for points, when points are displayed (see links
). If fac
is not NULL
, can be a vector of length one or a vector giving one value per group. Otherwise a vector of any length can be defined, which is recycled if necessary.
size of the points and/or of the variable names. For two-dimensional graphs: if fac
is not NULL
, can be a vector of length one or a vector giving one value per group; otherwise a vector of any length can be defined, which is recycled if necessary.
color(s) used for points, variable names and/or lines/sticks. For one-dimensional graphs, can be a vector of length one or a vector giving one value per line. For two-dimensional graphs: if fac
is not NULL
, can be a vector of length one or a vector giving one value per group. Otherwise a vector of any length can be defined, which is recycled if necessary (not available for density histograms, see dhist
).
width of lines. For one-dimensional graphs, can be a vector of length one or a vector giving one value per line. For two-dimensional graphs: if fac
is not NULL
, can be a vector of length one or a vector giving one value per group. Otherwise a vector of any length can be defined, which is recycled if necessary.
only used for one-dimensional graphs. Can be a vector of length one or a vector giving one value per line.
logical indicating if external axes should be drawn.
only used for two-dimensional graphs. Logical indicating if internal axes should be drawn.
only used in two-dimensional graphs. Limits of the horizontal axis. If NULL
, limits are computed automatically.
limits of the vertical axis. If NULL
, limits are computed automatically.
Maxime HERVE <maxime.herve@univ-rennes1.fr>
This function should not be use directly. Prefer the general MVA.plot
, to which all arguments can be passed.
Many multivariate analyses are supported, from various packages:
- PCA: prcomp
, princomp
, dudi.pca
, rda
, pca
, pca
.
- sPCA: spca
.
- IPCA: ipca
.
- sIPCA: sipca
.
- LDA: lda
, discrimin
.
- PLS-DA (PLS2 on a dummy-coded factor): plsda
. X space only.
- sPLS-DA (sPLS2 on a dummy-coded factor): splsda
. X space only.
- CPPLS: mvr
. X space only.
- PLSR: mvr
, pls
, plsR
(plsRglm package). X space only.
- sPLSR: pls
. X space only.
- PLS-GLR: plsRglm
(plsRglm package).
- PCR: mvr
.
- CDA: discrimin
, discrimin.coa
.
- NSCOA: dudi.nsc
.
- MCA: dudi.acm
.
- Mix analysis: dudi.mix
, dudi.hillsmith
.
- PCIA: procuste
. Set 1 is X, set 2 is Y.
- RDA (or PCAIV): pcaiv
, pcaivortho
, rda
. With rda
, space 1 is constrained space, space 2 is unconstrained space. Only constrained space is available with pcaiv
, the opposite for pcaivortho
.
- CCorA: rcc
. Space 1 is X, space 2 is Y.
- rCCorA: rcc
. Space 1 is X, space 2 is Y.
- CIA: coinertia
. Space 1 is X, space 2 is Y.
- 2B-PLS: pls
. Space 1 is X, space 2 is Y.
- 2B-sPLS: pls
. Space 1 is X, space 2 is Y.
- rGCCA: wrapper.rgcca
. Space can be 1 to n, the number of blocks (i.e. datasets).
- sGCCA: wrapper.sgcca
. Space can be 1 to n, the number of blocks (i.e. datasets).
- DIABLO: block.plsda
, block.splsda
. Space can be 1 to n, the number of blocks (i.e. datasets).
require(ade4)
data(olympic)
PCA <- dudi.pca(olympic$tab,scannf=FALSE)
MVA.plot(PCA,"load")
Run the code above in your browser using DataLab