Skip to contents

Detailed statistics on principal components analysis (PCA).

Usage

detailedPCA(X, center = TRUE, scale = TRUE)

Arguments

X

A complex matrix (or data frame) that serves as the data for principal components analysis, featuring variables arranged in columns and observations in rows.

center

A logical value (default = TRUE) indicating whether the variables should be shifted to be zero centered.

scale

A logical value (default = TRUE) indicating whether the variables should be scaled to have unit variance before the analysis takes place.

Value

A list containing the following components:

sdev

The standard deviations of the principal components, calculated as the square roots of the eigenvalues of the covariance/correlation matrix. The calculation is actually done with the singular values of the data matrix.

eigval

The eigenvalues of the covariance/correlation matrix, representing the variance of the principal components. The calculation is actually done with the singular values of the data matrix.

pctvar

The percentage of variance explained by each principal component.

cumvar

The cumulative percentage of variance explained by each principal component.

rotation

The matrix of variable loadings (i.e., a matrix whose columns contain the eigenvectors).

score

The value of the rotated data (the centred (and scaled if requested) data multiplied by the rotation matrix), representing the scores of the supplied data on all principal components.

Psi

The Psi index, which depends on the magnitude of the eigenvalues taken from the correlation matrix of the data set. $$\Psi = \sum(\lambda_i-1)^2,$$ where \(\lambda\) is the eigenvalue.

Phi

The Phi statistic, which measures the average level of correlation among the variables. $$\Phi = \sqrt{\frac{\sum\lambda_i^2-p}{p(p-1)}},$$ where \(\lambda\) is the eigenvalue, and \(p\) is the number of variables.

correlation

The correlations of the principal components with the variables (Jackson, 1991).

indexload

The index of the loadings (Vieira, 2012).

center

The centering used, or FALSE.

scale

The scaling used, or FALSE.

References

  • Gleason, T. C. and Staelin, R. (1975). A Proposal for Handling Missing Data. Psychometrika, 40(2), 229--252.

  • Mardia, K. V., Kent, J. T. and Bibby, J. M. (1979). Multivariate Analysis. London, UK: Academic Press.

  • Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988). The New S Language. Wadsworth & Brooks/Cole. Computer Science Series, Pacific Grove, CA.

  • Jackson, J. Edward. (1991). A User's Guide to Principal Components. John Wiley & Sons, New York, USA.

  • Vieira, Vasco M. N. C. S. (2012). Permutation Tests to Estimate Significances on Principal Components Analysis. Computational Ecology and Software, 2(2), 103--123.

  • Venables, W. N. and Ripley, B. D. (2013). Modern Applied Statistics with S-PLUS. Springer Science & Business Media.