Learn R Programming

psych (version 1.0-25)

principal: Principal components analysis

Description

Does an eigen value decomposition and returns eigen values, loadings, and degree of fit for a specified number of components. Basically just is doing a principal components for n principal components. Can show the residual correlations as well. The quality of reduction in the squared correlations is reported by comparing residual correlations to original correlations. Unlike princomp, this returns a subset of just the best nfactors. The eigen vectors are rescaled by the sqrt of the eigen values to produce the component loadings more typical in factor analysis.

Usage

principal(r, nfactors = 0, residuals = FALSE,rotate=FALSE, digits=2)

Arguments

r
a correlation matrix
nfactors
Number of components to extract
residuals
FALSE, do not show residuals, TRUE, report residuals
rotate
digits
digits =2 Accuracy of answers as well as display

Value

  • valuesEigen Values of all components -- useful for a scree plot
  • loadingsA standard loading matrix
  • fitFit of the model to the correlation matrix
  • residualResidual matrix -- if requested

Details

Useful for those cases where the correlation matrix is improper (perhaps because of SAPA techniques).

See Also

VSS,factor2cluster,factor.pa, factor.congruence

Examples

Run this code
#Four principal components of the Harmon 24 variable problem
#compare to a four factor principal axes solution using factor.congruence
pc <- principal(Harman74.cor$cov,4,rotate=TRUE)
pa <- factor.pa(Harman74.cor$cov,4,rotate=TRUE)
round(factor.congruence(pc,pa),2)

Run the code above in your browser using DataLab