[R] R vs SPSS output for princomp

Brett Magill bmagill at earthlink.net
Wed May 7 00:39:24 CEST 2003


If you want factor analysis, you should use factanal or more generally, 
MLE, true.  Nonetheless, I have use for PCA as a factor extraction method 
in a couple of situations:

1.  To replicate results from that method
2.  When the covariance matrix is non-positive definite

I have written some code to do this.  See:

http://home.earthlink.net/~bmagill/MyMisc.html

Find the function prinfact and associated methods and functions.  This 
would replicate SPSS results of "factor analysis by principal components".

Another better option might be OLS estimation for the second situation.  I 
haven't the ability to implement this myself.  Maybe a future version of R?

At 04:31 PM 5/6/2003 +0100, Prof Brian Ripley wrote:
>Well, many other packages confuse (hopelessly) PCA and factor analysis,
>including SPSS.  They are separate statistical methods with very different
>purposes, that for factanal being quite rarely appropriate.  R is not
>written to reproduce the mistakes of other packages, but to implement
>sound statistical practice.




More information about the R-help mailing list