Description Usage Arguments Details Value See Also
View source: R/signCorrectionPCA.R
Corrects the sign ambiguity that exists in PCA by correlating scores with the data.
1 | signCorrectionPCA(data, loadings, scores)
|
data |
matrix; The data matrix with samples in the rows and variables in the columns. |
loadings |
matrix; The loading matrix with variables in the rows and components in the columns. |
scores |
matrix; The score matrix with samples in the rows and components in the columns. |
The sign of the jth component is defined as:
sum(cor(scores[, j], data) * loadings[, j]**2))
A list containing the sign corrected loadings and scores.
prcomp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.