PCA: Principal Components Analysis

View source: R/pca.R

PCAR Documentation

Principal Components Analysis

Description

PCA performs a principal components analysis

Usage

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

Examples

fit.pca <- PCA(Harman74.cor$cov, nfactors=4, rotate="varimax")

Rkabacoff/factorAnalysis documentation built on March 21, 2022, 3:15 p.m.