PrettyBarPlot: creates bar plots for a series of variables. It is used for...

View source: R/Plot4CATA.R

PrettyBarPlotR Documentation

creates bar plots for a series of variables. It is used for plotting bootstrap ratios or contributions from principal component analysis or related methods (e.g. correspondence analysis).

Description

PrettyBarPlot: Creates bar plots for a set of items (e.g., observations or variables) analyzed with multivariate methods such as PCA, CA, MCA, PLS, etc.

Usage

PrettyBarPlot(
  bootratio,
  threshold = 2,
  ylim = NULL,
  color.bar = c("lavender", "darkolivegreen3", "gray90"),
  color.letter = c("mediumpurple4", "darkolivegreen4", "gray75"),
  plotnames = TRUE,
  main = NULL,
  ylab = NULL
)

Arguments

bootratio

the bootstrap ratios (BR) to be plotted (e.g., obtained from Boot4PTCA).

threshold

The critical value for significance (default = 2, a value that matches a p < .05 significance level) |BR| < threshold are plotted in gray

ylim

a 2-element vector giving min and max for the y-axis; when NULL (default) set to c(min(0, min(y)), max(0,max(y))).

color.bar

a 3-element vector of color names for the bars for (respectively) significant positive, significant negative, and non-significant. Default is c('lavender','darkolivegreen3','gray90').

color.letter

a 3-element vector of color names for the names of the items for (respectively) significant positive, significant negative, and non-significant. Default is c('mediumpurple4','darkolivegreen4','gray75').

plotnames

if TRUE (default) write the names of the items

main

(default is NULL) a title for the graph.

ylab

(default is NULL) a label for the y-axis (i.e., BR).

Details

PrettyBarPlot is used to display the bootstrap ratios or contributions plots for CA/MCA/PCA/PLS, etc. Significant or important items are plotted in color, non-significant items are plotted in gray.

PrettyBarPlot2, is a newer ggplot2-based version that can be used in lieu of PrettyBarPlot.

Value

A list: 1) ylim: min and max for y, and 2) threshold.

Author(s)

Hervé Abdi

Hervé Abdi, Derek Beaton, and Vincent Guillemot.

See Also

PrettyBarPlot2


HerveAbdi/PTCA4CATA documentation built on July 17, 2022, 5:41 a.m.