Skip to contents

PlotScreeWithCI: Plot the scree for the eigenvalues of an SVD-based multivariate analysis. Note that the function can recompute the eigen-values when a percentage is given. For example ExPosition does not return all ev but only the requested one. but return all percentage so if max.ev is specified, it is used to recompute all eigenvalues. By default PlotScree will not plot the line corresponding to the average inertia (i.e., Kaiser criterion). If provided with probabilities, PlotScree will color differently the "significant" eigenvalues.

Usage

PlotScreeWithCI(
  ev,
  p.ev = NULL,
  max.ev = NULL,
  ci.ev = NULL,
  ci.tau = NULL,
  polygon.ci = "tau",
  alpha = 0.05,
  col.ns = "#006D2C",
  col.sig = "#54278F",
  title = "Explained Variance per Dimension",
  xlab = "Dimensions",
  plotKaiser = FALSE,
  color4Kaiser = "darkorchid4",
  lwd4Kaiser = 2.5
)

Arguments

ev

the eigenvalues to plot. No default.

p.ev

the probabilities associated to the eigen-values, (default = NULL).

max.ev

the max eigenvalue needed because ExPosition does not always return all eigenvalues but sometimes only the requested ones; however ExPosition always returns all percentages i.e., tau), so if max.ev is specified, it is used to recompute all eigenvalues.

ci.ev,

confidence intervals for the eigenvalues, computed with Boot4Eigs. Default to NULL.

ci.tau,

confidence intervals for the taus, computed with Boot4Eigs. Default to NULL.

polygon.ci,

the confidence intervals to plot. 'tau' will plot the bootstrap confidence intervals of taus; 'ev' will plot the bootstrap confidence intervals of eigenvalues; NULL will not plot the polygon. Default to 'tau'.

alpha

threshold for significance Default = .05).

col.ns

color for the non significant eigenvalues. Default is 'Green'.

col.sig

color for significant eigen-values. Default is 'Violet'.

title

a title for the graph default is "Explained Variance per Dimension".

xlab

The names of the dimensions (default 'Dimensions').

plotKaiser

when TRUE plot a line corresponding to the average inertia (Kaiser criterion); do not plot when FALSE (default).

color4Kaiser

color for Kaiser's line (default is 'darkorchid4')

lwd4Kaiser

lwd value (i.e., width) for Kaiser's criterion line. (default is '2.5')

Author

Hervé Abdi with help from Derek Beaton and Ju-Chi Yu.

Examples

 # PlotScree(ev)