biplot.Rd
This function produces a list of elements to be used when producing a biplot, which provides a useful data analysis tool and allows the visual appraisal of the structure of large data matrices. Biplots are the multivariate analogue of scatter plots. They approximate the multivariate distribution of a sample in a few dimensions and they superimpose on this display representations of the variables on which the samples are measured.
biplot(data, classes = NULL, group.aes = NULL, center = TRUE, scaled = FALSE,
Title = NULL)
a data frame or numeric matrix containing all variables the user wants to analyse.
a vector identifying class membership.
a vector identifying groups for aesthetic formatting.
a logical value indicating whether data
should be column centered, with default TRUE
.
a logical value indicating whether data
should be standardised to unit column variances, with default FALSE
.
the title of the biplot to be rendered, enter text in " ".
A list with the following components is available:
the matrix of the centered and scaled numeric variables.
the data frame of the categorical variables.
the original data.
the vector of category levels for the class variable. This is to be used for colour
, pch
and cex
specifications.
the vector of observations that have been removed.
a logical value indicating whether \(\mathbf{X}\) is centered.
a logical value indicating whether \(\mathbf{X}\) is scaled.
the vector of means for each numeric variable.
the vector of standard deviations for each numeric variable.
the number of observations.
the number of variables.
the vector of category levels for the grouping variable. This is to be used for colour
, pch
and cex
specifications.
the descriptive names to be used for group labels.
the number of groups.
the title of the biplot rendered
This function is the entry-level function in biplotEZ
to construct a biplot display.
It initialises an object of class biplot
which can then be piped to various other functions
to build up the biplot display.
The biplot display can be built up in four broad steps depending on the needs for the display. Firstly, choose an appropriate method to construct the display; Secondly, change the aesthetics of the display; Thirdly, append the display with supplementary features such as axes, samples and means; Finally, superimpose shapes, characters or elements onto the display.
1. Different types of biplots:
PCA()
: Principal Component Analysis biplot of various dimensions
CVA()
: Canonical Variate Analysis biplot
PCO()
: Principal Coordinate Analysis biplot
CA()
: Correspondence Analysis biplot
regress()
: Regression biplot method
2. Customise the biplot display with aesthetic functions:
samples()
: Change the formatting of sample points on the biplot display
axes()
: Change the formatting of the biplot axes
3. Supplement the existing biplot with additional axes, samples and group means:
newsamples()
: Add and change formatting of additional samples
newaxes()
: Add and change formatting of additional axes
means()
: Insert class means to the display, and format appropriately
4. Append the biplot display:
alpha.bags()
: Add \(\alpha\)-bags
ellipses()
: Add ellipses
density2D()
: Add 2D density regions
Other useful links:
Gabriel, K.R. (1971) The biplot graphic display of matrices with application to principal component analysis. Biometrika. 58(3):453–467.
Gower, J., Gardner-Lubbe, S. & Le Roux, N. (2011, ISBN: 978-0-470-01255-0) Understanding Biplots. Chichester, England: John Wiley & Sons Ltd.
Gower, J.C. & Hand, D.J.(1996, ISBN: 0-412-71630-5) Biplots. London: Chapman & Hall.