Description Usage Arguments Details Author(s) References See Also Examples
Plot functions for FRBpca
objects: plots PC variances, PC angles and PC loadings, with bootstrap inference
1 2 3 4 5 6 7 8 9 10 | ## S3 method for class 'FRBpca'
plot(x, which = 1:3, pcs.loadings = 1:min(5, length(x$eigval)),
confmethod = c("BCA","basic"), ...)
plotFRBvars(x, cumul = 2, confmethod = c("BCA","basic"),
npcs = min(10, length(x$eigval)))
plotFRBangles(x, pcs = 1:min(12,length(x$eigval)))
plotFRBloadings(x, confmethod = c("BCA","basic"),
pcs = 1:min(5, length(x$eigval)), nvars=min(10, length(x$eigval)))
|
x |
an R object of class |
which |
integer number(s) between 1 and 3 to specify which plot is desired (1 = variances; 2 = angles; 3 = loadings) |
pcs.loadings |
integer number(s) indicating for which of the PCs the loadings should be shown (in case the
|
cumul |
integer between 0 and 2: 0 = screeplot, i.e. the variances of the PCs are shown; 1 = the cumulative variances (percentage) of the PCs are shown; 2 = (default) both plots are shown on the same page |
confmethod |
which kind of bootstrap confidence intervals to be displayed: 'BCA'= bias corrected and accelerated method, 'basic'= basic bootstrap method |
npcs |
number of PCs to be included in screeplot/cumulative variances plot |
pcs |
PCs to consider in plot; defaults to first 12 (maximally) for |
nvars |
number of variables for which loadings should be shown in each PC; the loadings are shown in decreasing order in each PC |
... |
potentially more arguments |
The generic plot
function calls plotFRBvars
, plotFRBangles
and
plotFRBloadings
, according to which
of these are respectively specified in argument which
, and
displays the plots on separate pages (the user is prompted for each new page). The PCs for which the loadings should be plotted
can be specified through the pcs.loadings
argument. The other arguments are set to their default values by plot
.
The solid curves displayed by plotFRBvars
indicate the actual estimates of the variances (or percentages), while the dashed curves represent the confidence
limits as computed by FRBpcaS
or FRBpcaMM
.
plotFRBangles
plots, for each PC, histograms of the angles between the bootstrapped PC and the original PC estimate.
The angles are in radians, between 0 and pi/2. These limits are indicated by the red vertical lines. Angles close to zero correspond
to bootstrapped PCs closely aligned with the original PC, while an angle close to pi/2 means the bootstrapped PC is roughly
perpendicular to the original estimate (hence a large number of angles close to pi/2 implies high variability).
If the number of PCs specified in pcs
is very large (usually larger than the default settings), the histograms may not fit
on one page and a selection will be made (the user will be given a warning in that case).
In plotFRBloadings
, the red dots represent the loadings, which are between -1 and 1. The square brackets indicate the confidence
limits as computed by FRBpcaS
or FRBpcaMM
. Only the loadings of the first nvars
variables
are shown, where the variables were ordered according to the absolute value of the loading (i.e. only the nvars
most important
variables for that particular PC are shown).
Gert Willems and Ella Roelant
S. Van Aelst and G. Willems (2013). Fast and robust bootstrap for multivariate inference: The R package FRB. Journal of Statistical Software, 53(3), 1–32. URL: http://www.jstatsoft.org/v53/i03/.
FRBpcaS
, FRBpcaMM
, summary.FRBpca
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(ForgedBankNotes)
MMpcares <- FRBpcaMM(ForgedBankNotes, R=999, conf=0.95)
plot(MMpcares)
# a closer look at the screeplot, specifying basic bootstrap intervals
plotFRBvars(MMpcares, cumul=0, confmethod="basic")
# plots the bootstrap angles for the first PC only
plotFRBangles(MMpcares, pcs=1)
# plots the loadings, with basic bootstrap intervals, for *all* the PCs
plotFRBloadings(MMpcares, confmethod="basic", pcs=1:ncol(ForgedBankNotes))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.