get_SVD | R Documentation |
Biplots are based on the Singular Value Decomposition, which for a data matrix is
\mathbf{X} / \sqrt{n} = \mathbf{U} \mathbf{D} \mathbf{V}^T
but these are computed and returned in quite different forms by various PCA-like methods. This function provides a common interface, returning the components with standard names.
get_SVD(pcobj)
pcobj |
an object returned by |
A list of four elements
The sample size on which the analysis was based
Left singular vectors, giving observation scores
vector of singular values, the diagonal elements of the matrix \mathbf{D}
, which are also the square roots
of the eigenvalues of \mathbf{X} \mathbf{X}'
Right singular vectors, giving variable loadings
data(crime)
crime.pca <-
crime |>
dplyr::select(where(is.numeric)) |>
prcomp(scale. = TRUE)
crime.svd <- get_SVD(crime.pca)
names(crime.svd)
crime.svd$D
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.