| PCA | R Documentation |
Principal components analysis
PCA(data, Nfactors=NULL, rotation='promax', corkind='pearson',
Ncases=NULL, ppower = 3,
GPA_options = list(delta = .01,
epsilon = .00001,
normalize = FALSE,
maxit = 1000,
randomStarts = 50),
verbose=TRUE, rotate)
data |
An all-numeric dataframe where the rows are cases & the columns are the variables, or a correlation matrix with ones on the diagonal.The function internally determines whether the data are a correlation matrix. |
Nfactors |
The number of components to extraction. If not specified, then the EMPKC procedure will be used to determine the number of components. |
rotation |
The factor rotation method for the analysis. The orthogonal rotation options are: 'varimax' (the default), 'quartimax', 'bentlerT', 'equamax', 'geominT', 'entropy', and 'none'. The oblique rotation options are: 'promax' (the default), 'quartimin', 'oblimin', 'oblimax', 'simplimax', 'bentlerQ', 'geominQ', and 'none'. |
corkind |
The kind of correlation matrix to be used if data is not a correlation matrix. The options are 'pearson', 'kendall', 'spearman', 'gamma', and 'polychoric'. Required only if the entered data is not a correlation matrix. |
Ncases |
The number of cases. Required only if data is a correlation matrix. |
ppower |
The power value to be used in a promax rotation (required only if rotation = 'promax'). Suggested value: 3 |
GPA_options |
(optional) A list with options for when a GPArotation is used. See the Details section below. |
verbose |
Should detailed results be displayed in console? TRUE (default) or FALSE |
rotate |
(Deprecated.) Use 'rotation' instead. |
The factor rotation computations for the following methods are conducted using the GPArotation package (Bernaards & Jennrich, 2005, 2026): 'bentlerQ', 'bentlerT', 'entropy', 'geominQ', 'geominT', 'oblimax', 'oblimin', 'quartimax', 'quartimin', and 'simplimax'.
For factor rotation (see Jennrich, 2018, for a review):
bentlerQ is an oblique rotation based on Bentler's invariant pattern simplicity criterion.
bentlerT is an orthogonal rotation based on Bentler's invariant pattern simplicity criterion
bifactorQ is an oblique bifactor rotation designed for when a strong, overarching global dimension is expected alongside separate sub-domains that are allowed to correlate with each other.
bifactorT is an orthogonal bifactor rotation designed for situations where a single, overarching global dimension is expected alongside separate sub-domains, and when all factors should be uncorrelated.
bigeominQ is an oblique bifactor rotation designed for where there is a broad, overarching factor alongside sub-domains that are allowed to overlap.
bigeominT an orthogonal bifactor rotation method designed for exploratory bifactor analysis that tries to ensure that once the general factor's variance is pulled out, each item loads onto only one specific group factor.
entropy entropy is an orthogonal factor rotation that pushes factor loadings to be either strongly dominant (close to 1.0) or cleanly absent (close to 0.0), reducing the overall informational "noise" of the matrix.
equamax is an orthogonal rotation designed as a mathematical compromise between varimax and quartimax.
geominQ is an oblique factor rotation method that find a clean "simple structure" even when the data contains highly complex variables (variables that naturally load on multiple factors).
geominT is an orthogonal factor rotation that combines the strict geometric constraint of uncorrelated factors with Brownes flexible, product-based geomin complexity criterion.
oblimax is an oblique factor rotation method that maximizes the number of very high and very low (near-zero) factor loadings.
oblimin is an oblique factor rotation that allows factors to correlate freely to achieve the simplest possible loading structure.
promax is a two-stage oblique factor rotation method.
quartimax is an orthogonal factor rotation designed to spread the explained variance evenly across the factors, actively preventing a single general factor from dominating.
simplimax is an oblique factor rotation that attempts to recover complex or messy "simple structures" where traditional continuous methods like oblimin or geomin fail.
quartimin is an oblique factor rotation that focuses on simplifying the rows of the loading matrix.
varimax is an orthogonal
factor rotation that maximizes the variance of the squared factor loadings within
each individual factor column.
For GPA_options:
A list with options for when a GPArotation is used. The list elements are 'delta', 'epsilon', 'normalize', 'maxit', and 'randomStarts'.
delta is a small positive number that is added to the squared factor loadings in the (geomin) optimization denominator to prevent division by zero and control the sharpness of the penalty near zero. (Note: In MPLus, delta is called "epsilon".)
epsilon is the numeric rotational convergence tolerance threshold. It controls how precise or strict the stopping rule is for the rotation algorithm. The gradient projection algorithm stops optimizing and assumes the rotation has converged when the norm of the gradient falls below this value.
normalize specifies whether and how the loadings matrix is normalized prior to rotation and denormalized after rotation. The possibilities are FALSE (the default) for no normalization, or TRUE, for the Kaiser/Horst normalization.
maxit is the maximum number of iterations.
randomStarts is an integer that specifies the number of
random starting configurations used to optimize the factor rotation.
It helps avoid getting trapped in local minima during factor rotation
optimization. It runs the gradient projection algorithm multiple timeseach
using a different random orthogonal or oblique starting rotation
matrix (Tmat) generated via QR decomposition.
It returns the rotated factor loadings matrix and results corresponding
to the run with the lowest objective criterion value among all attempts.
Run one of the following commands for more detailed descriptions of the above rotation methods:
RShowDoc("EFA_BIFACTOR_vignettes", package = "EFA.dimensions")
vignette("EFA_BIFACTOR_vignettes")
A list with the following elements:
loadingsNOROT |
The unrotated factor loadings |
loadingsROT |
The rotated factor loadings |
pattern |
The pattern matrix |
structure |
The structure matrix |
phi |
The correlations between the factors |
varexplNOROT1 |
The initial eigenvalues and total variance explained |
varexplROT |
The rotation sums of squared loadings and total variance explained for the rotated loadings |
cormat_reprod |
The reproduced correlation matrix, based on the rotated loadings |
fit_coeffs |
Model fit coefficients |
communalities |
The unrotated factor solution communalities |
uniquenesses |
The unrotated factor solution uniquenesses |
Brian P. O'Connor
# the Harman (1967) correlation matrix
PCA(data_Harman, Nfactors=2, Ncases=305, rotation='oblimin')
# Rosenberg Self-Esteem scale items
PCA(data_RSE, corkind='polychoric', Nfactors=2)
# NEO-PI-R scales
PCA(data_NEOPIR, Nfactors=5, rotation='promax')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.