PCA: Principal Components Analysis

Description Usage Arguments Details Value See Also Examples

View source: R/pca.R

Description

PCA performs a principal components analysis

Usage

1
PCA(data, nfactors = NULL, rotate = "none", digits = 2, ...)

Arguments

data

a data frame or correlation matrix.

nfactors

nuber of factors to extract.

rotate

factor rotation to perform.

digits

number of digits to retain.

...

parameters passed to the psych::principal function.

Details

The PCA function is a wrapper for the psych::principal function. Component rotations include none, varimax, and promax.

Value

returns a list with 5 components:

call

the call

loadings

structure matrix

variance

variance accounted for

phi

component intercorrelations for oblique rotations

scores

component scores if factors are extracted from a data frame

See Also

FA, plot.factorAnalysis, score, and scree_plot.

Examples

1
2
3
fit.pca <- PCA(Harman74.cor$cov, nfactors=4, rotate="varimax")
plot(fit.pca)
plot(fit.pca, type="bar")

Rkabacoff/qacr documentation built on March 20, 2021, 3:03 p.m.