plot.ContinuousBiplot: Plots a biplot for continuous data.

View source: R/plot.ContinuousBiplot.R

plot.ContinuousBiplotR Documentation

Plots a biplot for continuous data.

Description

Plots a biplot for continuous data.

Usage

## S3 method for class 'ContinuousBiplot'
plot(x, A1 = 1, A2 = 2, ShowAxis = FALSE, margin = 0,
                    PlotVars = TRUE, PlotInd = TRUE, WhatInds = NULL,
                    WhatVars = NULL, LabelVars = TRUE, LabelInd = TRUE,
                    IndLabels = NULL, VarLabels = NULL, mode = "a", CexInd
                    = NULL, CexVar = NULL, ColorInd = NULL, ColorVar =
                    NULL, LabelPos = 1, SmartLabels = FALSE,
                    AbbreviateLabels = FALSE, MinQualityInds = 0,
                    MinQualityVars = 0, dp = 0, PredPoints = 0, PlotAxis =
                    FALSE, TypeScale = "Complete", ValuesScale =
                    "Original", SizeQualInd = FALSE, SizeQualVars = FALSE,
                    ColorQualInd = FALSE, ColorQualVars = FALSE, PchInd =
                    NULL, PchVar = NULL, PlotClus = FALSE, TypeClus =
                    "ch", ClustConf = 1, ClustLegend = FALSE,
                    ClustLegendPos = "topright", ClustCenters = FALSE,
                    UseClusterColors = TRUE, CexClustCenters = 1,
                    PlotSupVars = TRUE, SupMode = "a", ShowBox = FALSE,
                    nticks = 5, NonSelectedGray = FALSE, PlotUnitCircle =
                    TRUE, PlotContribFA = TRUE, AddArrow = FALSE,
                    ColorSupContVars = "red", ColorSupBinVars = "red",
                    ColorSupOrdVars = "red", ModeSupContVars="a", 
                    ModeSupBinVars="a", ModeSupOrdVars="a", 
                    WhatSupBinVars = NULL, Title = NULL, Xlab = NULL, 
                    Ylab = NULL, add = FALSE, PlotTrajVars = FALSE, 
                    PlotTrajInds = FALSE, LabelTraj = "end", Limits = NULL,
                    PlotSupInds = FALSE, WhatSupInds = NULL,
                    ColorSupInd = "black", CexSupInd = 0.8, PchSupInd =
                   16, LabelSupInd = TRUE, PredSupPoints = 0,  CexScale =
                    0.5, ...)

Arguments

x

An object of class "Biplot"

A1

Dimension for the first axis. 1 is the default.

A2

Dimension for the second axis. 2 is the default.

ShowAxis

Logical variable to control if the coordinate axes should appear in the plot. The default value is FALSE because for most of the biplots its presence is irrelevant.

margin

Margin for the labels in some of the biplot modes (percentage of the plot width). Default is 0. Increase the value if the labels are not completely plotted.

PlotVars

Logical to control if the Variables (Columns) are plotted.

PlotInd

Logical to control if the Individuals (Rows) are plotted.

WhatInds

Logical vector to control what individuals (Rows) are plotted. (Can be also a binary vector)

WhatVars

Logical vector to control what variables (Columns) are plotted. (Can be also a binary vector)

LabelVars

Logical to control if the labels for the Variables are shown

LabelInd

Logical to control if the labels for the individuals are shown

IndLabels

A set of labels for the individuals. If NULL the default object labels are used

VarLabels

A set of labels for the variables. If NULL the default object labels are used

mode

Mode of the biplot: "p", "a", "b", "h", "ah" and "s".

CexInd

Size for the symbols and labels of the individuals. Can be a single common size for all the points or a vector with individual sizes.

CexVar

Size for the symbols and labels of the variables. Can be a single common size for all the points or a vector with individual sizes.

ColorInd

Color for the symbols and labels of the individuals. Can be a single common color for all the points or a vector with individual colors.

ColorVar

Color for the symbols and labels of the variables. Can be a single common color for all the points or a vector with individual colors.

LabelPos

Position of the labels in relation to the point. (Se the graphical parameter pos )

SmartLabels

Plot the labels in a smart way

AbbreviateLabels

Should labels be abbreviated?

MinQualityInds

Minimum quality of representation for an individual to be plotted.

MinQualityVars

Minimum quality of representation for a variable to be plotted.

dp

A set of indices with the variables that will show the projections of the individuals.

PredPoints

A vector with integers. The row points listed in the vector are projected onto all the variables.

PlotAxis

Not Used

TypeScale

Type of scale to use : "Complete", "StdDev" or "BoxPlot"

ValuesScale

Values to show on the scale: "Original" or "Transformed"

SizeQualInd

Should the size of the row points be related to their qualities of representation (predictiveness)?

SizeQualVars

Should the size of the column points be related to their qualities of representation (predictiveness)?

ColorQualInd

Should the color of the row points be related to their qualities of representation (predictiveness)?

ColorQualVars

Should the color of the column points be related to their qualities of representation (predictiveness)?

PchInd

Symbol for the row points. See help(points) for details.

PchVar

Symbol for the column points. See help(points) for details.

PlotClus

Should the clusters be plotted?

TypeClus

Type of plot for the clusters. ("ch"- Convex Hull, "el"- Ellipse or "st"- Star)

ClustConf

Percent of points included in the cluster. only the ClusConf percent of the points nearest to the center will be used to calculate the cluster

ClustLegend

Should a legend for the clusters be plotted? Default FALSE

ClustLegendPos

Position of the legend for the clusters. Default "topright"

ClustCenters

Should the cluster centers be plotted

UseClusterColors

Should the cluster colors be used in the plot

CexClustCenters

Size of the cluster centres

PlotSupVars

Should the supplementary variables be plotted?

SupMode

Mode of the supplementary variables.

ShowBox

Should a box around the poitns be plotted?

nticks

Number of ticks for the representation of the variables

NonSelectedGray

The nonselected individuals and variables aplotted in light gray colors

PlotUnitCircle

Plot the unit circle in the biplot for a Factor Analysis in which the lenght of the column arrows is smaller than 1 and is the quality of representation.

PlotContribFA

Plot circles in the biplot for a Factor Analysis with different values of the quality of representation.

AddArrow

Add an arrow to the representation of other modes of the biplot.

ColorSupContVars

Colors for the continuous supplementary variables.

ColorSupBinVars

Colors for the binary supplementary variables.

ColorSupOrdVars

Colors for the ordinal supplementary variables.

ModeSupContVars

Mode for the continuous supplementary variables.

ModeSupBinVars

Mode for the binary supplementary variables.

ModeSupOrdVars

Mode for the ordinal supplementary variables.

WhatSupBinVars

What supplementary binary variables should be plotted?

Title

Title of the plot.

Xlab

Label for the X axis

Ylab

Label for the Y axis

add

Should the plot be added to an existing plot?

PlotTrajVars

Plot trajectories for the variables (when appropriate)?

PlotTrajInds

Plot trajectories for the individuals (when appropriate)?

LabelTraj

Label trajectories for the variables (when appropriate)?

Limits

Limits of the axis for the plot

PlotSupInds

Should the supplementary individuals be plotted?

WhatSupInds

What supplementary individuals are going to be plotted

ColorSupInd

Colors for the supplementary individuals

CexSupInd

Sizes for the supplementary individuals

PchSupInd

Symbols for the supplementary individuals

LabelSupInd

Labels for the supplementary individuals

PredSupPoints

Predictions for the supplementary individuals

CexScale

Sizes of the scales

...

Any other graphical parameters.

Details

Plots a biplot for continuous data. The Biplot for continuous data is taken as the basis of the plot. If there are a mixture of different types of variables (binary, nominal, abundance, ...) are added to the biplot as supplementary parts.

There are several modes for plotting the biplot. "p".- Points (Rows and Columns are represented by points)

"a" .- Arrows (The traditional representation with points for rows and arrows for columns)

"b" .- The arrows for the columns are extended to both extremes of the plot and labeled outside the plot area.

"h" .- The arrows for the columns are extended to the positive extreme of the plot and labeled outside the plot area.

"ah" .- Same as arrows but labeled outside the plot area.

"s" .- The directions (or biplot axes) have a graded scale for prediction of the original values.

The TypeScale argument applies only to the "s" mode. There are three types:

"Complete" .- An equally spaced scale covering the whole range of the data is calculates.

"StdDev" .- Mean with one, two and three stadard deviations

"BoxPlot" .- Box-Plot like Scale (Median, 25 and 75 percentiles, maximum and minimum values.)

The ValuesScale argument applies only to the "s" mode and controls if the labels show the Original ot Transformed values.

Some of the initial transformations are not compatible with some of the types of biplots and scales. For example, It is not possible to recover by projection the original values when you double centre de data. In that case you have the residuals for interaction and only the transformed values make sense.

It is possible to associate the color and the size of the points with the quality of representation. Bigger points correspond to better representation quality.

Value

No value Returned

Author(s)

Jose Luis Vicente Villardon

References

Gabriel, K. R. (1971). The biplot graphic display of matrices with application to principal component analysis. Biometrika, 58(3), 453-467.

Galindo Villardon, M. (1986). Una alternativa de representacion simultanea: HJ-Biplot. Questiio. 1986, vol. 10, num. 1.

Vicente-Villardon, J. L., Galindo Villardon, M. P., & Blazquez Zaballos, A. (2006). Logistic biplots. Multiple correspondence analysis and related methods. London: Chapman & Hall, 503-521.

Gower, J. C., & Hand, D. J. (1995). Biplots (Vol. 54). CRC Press.

Gower, J. C., Lubbe, S. G., & Le Roux, N. J. (2011). Understanding biplots. John Wiley & Sons.

Blasius, J., Eilers, P. H., & Gower, J. (2009). Better biplots. Computational Statistics & Data Analysis, 53(8), 3145-3158.

Examples

data(Protein)
bip=PCA.Biplot(Protein[,3:11])
plot(bip, mode="s", margin=0.2, ShowAxis=FALSE)

MultBiplotR documentation built on Nov. 21, 2023, 5:08 p.m.