问题
I need to do a principal component analysis (PCA) with EQUAMAX-rotation in R.
Unfortunately the function "principal()" I use normally for PCA does not offer this kind of rotation.
I could find out that it may be possible somehow with the package GPArotation but I could not yet figure out how to use this in the PCA.
Maybe someone can give an example on how to do an equamax-rotation PCA?
Or is there a function for PCA in another package that offers the use of equamax-rotation directly?
Thank you for your help!
回答1:
The package psych from i guess you are using principal() has the rotations varimax, quatimax, promax, oblimin, simplimax, and cluster but not equimax (psych p.232) which is a compromise between Varimax and Quartimax
excerpt from the STATA manual: mvrotate p.3
Rotation criteria
In the descriptions below, the matrix to be rotated is denoted as A, p denotes the number of rows of A, and f denotes the number of columns of A (factors or components). If A is a loading matrix from factor or pca, p is the number of variables, and f is the number of factors or components.
Criteria suitable only for orthogonal rotations
varimaxandvgpfapply the orthogonalvarimaxrotation (Kaiser 1958).varimaxmaximizes the variance of the squared loadings within factors (columns of A). It is equivalent tocf(1/p) and tooblimin(1).varimax, the most popular rotation, is implemented with a dedicated fast algorithm and ignores all optimize options. Specifyvgpfto switch to the general GPF algorithm used for the other criteria.
quartimaxuses thequartimaxcriterion (Harman 1976).quartimaxmaximizes the variance of the squared loadings within the variables (rows of A). For orthogonal rotations,quartimaxis equivalent tocf(0) and tooblimax.
equamaxspecifies the orthogonalequamaxrotation.equamaxmaximizes a weighted sum of thevarimaxandquartimaxcriteria, reflecting a concern for simple structure within variables (rows of A) as well as within factors (columns of A).equamaxis equivalent tooblimin(p/2)andcf(#), where # = f /(2p).
now the cf (Crawford-Ferguson) method is also available in GPArotation
cfTorthogonal Crawford-Ferguson family
cfT(L, Tmat=diag(ncol(L)), kappa=0, normalize=FALSE, eps=1e-5, maxit=1000)The argument kappa parameterizes the family for the Crawford-Ferguson method. If m is the number of factors and p is the number of indicators then kappa values having special names are 0=Quartimax, 1/p=Varimax, m/(2*p)=Equamax, (m-1)/(p+m-2)=Parsimax, 1=Factor parsimony.
X <- matrix(rnorm(500), ncol=10)
C <- cor(X)
eig <- eigen(C)
# PCA by hand scaled by sqrt
eig$vectors * t(matrix(rep(sqrt(eig$values), 10), ncol=10))
require(psych)
PCA0 <- principal(C, rotate='none', nfactors=10) #PCA by psych
PCA0
# as the original loadings PCA0 are scaled by their squarroot eigenvalue
apply(PCA0$loadings^2, 2, sum) # SS loadings
## PCA with Equimax rotation
# now i think the Equamax rotation can be performed by cfT with m/(2*p)
# p number of variables (10)
# m (or f in STATA manual) number of components (10)
# gives m==p --> kappa=0.5
PCA.EQ <- cfT(PCA0$loadings, kappa=0.5)
PCA.EQ
I upgraded some of my PCA knowledge by your question, hope it helps, good luck
来源:https://stackoverflow.com/questions/24300853/principal-component-analysis-with-equamax-rotation-in-r