biplot | R Documentation |
Produces a 2- or 3-dimensional biplot of the data according to the orthogonal projection matrix supplied.
biplot(datalist, B, D3 = FALSE, varex = 1, plotvar = TRUE, main = "CPC biplot", col = c("blue", "red", "green", "orange", "brown", "purple"), radius = 0.1, lwd = 3)
datalist |
List of the data from the k groups. |
B |
Orthogonal projection matrix. |
D3 |
Logical, indicating whteher a 3-dimensional biplot should be produced (default = FALSE). |
varex |
Expansion factor for drawing the variables on the biplot. |
plotvar |
Logical, indicating whether the variables should be drawn on the biplot (default = TRUE). |
main |
Title of the biplot, to be passed to |
col |
Colors for the data points of the k groups. |
radius |
Radius of the spheres in the case of a 3D biplot being drawn, to be passed to |
lwd |
Line width of the variable vectors in the case of a 3D biplot being drawn, to be passed to |
This function may be used to produce a biplot in Euclidean space using any orthogonal projection matrix B
. The obvious choice for B
is the eigenvectors of the pooled data, producing the usual PCA biplot. Other choices for B
includes the common eigenvector matrices estimated with the FG algorithm or stepwise CPC.
Produces a biplot in a graphics device window.
Theo Pepler
Pepler, P.T. (2014). The identification and application of common principal components. PhD dissertation in the Department of Statistics and Actuarial Science, Stellenbosch University.
biplot.measures
, biplot.choice
# The Iris data data(iris) setosa <- iris[1:50, 1:4] versicolor <- iris[51:100, 1:4] virginica <- iris[101:150, 1:4] project.matrix <- eigen(cov(rbind(setosa, versicolor, virginica)))$vectors # For a 2-dimensional biplot cpc::biplot(datalist = list(setosa, versicolor, virginica), B = project.matrix, varex = 3, main = "CPC biplot: Iris data") # For a 3-dimensional biplot cpc::biplot(datalist = list(setosa, versicolor, virginica), B = project.matrix, D3 = TRUE, main = "CPC biplot: Iris data")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.