CA | R Documentation |
This function produces a list of elements to be used for CA biplot construction by approximation of the Pearson residuals.
CA(bp, dim.biplot = c(2,1,3), e.vects = 1:ncol(bp$X), variant = "Princ",
lambda.scal = FALSE)
bp |
object of class |
dim.biplot |
dimension of the biplot. Only values 1, 2 and 3 are accepted, with default |
e.vects |
which eigenvectors (canonical variates) to extract, with default |
variant |
which correspondence analysis variant, with default "Princ", presents a biplot with rows in principal coordinates
and columns in standard coordinates. |
lambda.scal |
logical value to request lambda-scaling, default is |
A list with the following components is available:
Z |
Combined data frame of the row and column coordinates. |
r |
Numer of levels in the row factor. |
c |
Numer of levels in the column factor. |
Dr |
Diagonal matrix of row profiles. |
Dc |
Diagonal matrix of column profiles. |
Drh |
Weighted row profiles. |
Dch |
Weighted column profiles. |
rowcoor |
Row coordinates based on the selected |
colcoor |
Column coordinates based on the selected |
P |
Correspondence Matrix. |
Smat |
Standardised Pearson residuals. |
SVD |
Singular value decomposition solution: |
e.vects |
Depending on what was specified in |
dim.biplot |
The dimension of the biplot. |
lambda.val |
The computed lambda value if lambda-scaling is requested. |
gamma |
Contribution of the singular values, based on the CA variant. |
biplot()
# Creating a CA biplot with rows in principal coordinates:
biplot(HairEyeColor[,,2], center = FALSE) |> CA() |> plot()
# Creating a CA biplot with rows in standard coordinates:
biplot(HairEyeColor[,,2], center = FALSE) |> CA(variant = "Stand") |>
samples(col=c("magenta","purple"), pch = c(15,17), label.col = "black") |> plot()
# Creating a CA biplot with rows and columns scaled equally:
biplot(HairEyeColor[,,2], center = FALSE) |> CA(variant = "Symmetric") |>
samples(col = c("magenta","purple"), pch = c(15,17), label.col = "black") |> plot()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.