Description Usage Arguments Details Value Author(s) See Also Examples
Principal Component Analysis (PCA) methods prcomp
and
princomp
do not accurately reflect the proportion of total variation of each principal component.
Instead princomp
calculates these values on the eigenvalue adjusted data, which
misleadingly indicates that each component contributes equally to the variability in the loadings output.
prcomp
does not report the proportion of variablity. To rectify this,
Loadings.variation
displays the relative and cumulative contribution of variation for
each component by accounting for all variability in data. Component variation is reported by the lambda value
(which corresponds to the eigenvalue in princomp
), while the proportion and cumulative variation
relate these values to the total variability in data.
1 | Loadings.variation(sdev, digits = 5)
|
sdev |
vector of standard deviations for each component |
digits |
number of decimal places to retain. Default is 5. |
For each component:
Lambda = sdev^2 Component Variance PTV = Lambda / sum(Lambda) Proportion of Total Variation CTV = cumsum(PTV) Cumulative Total Variation
All variability is accounted for in Principal Components, where each component is orthogonal and in decreasing order of variation explained. This allows PTV to be calculated as a proportion of the sum of individual variances and CTV=1 when accounting for all components.
labeled matrix of variation for loading components. Lambda represents the variation for each component, PTV is the Proportion of Total Variation and CTV is the Cumulative Proportion of Total Variation. Values are rounded according to the number of digits specified.
Lisa McFerrin
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.