[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

# Re: st: RE: PCA vs. Factor Loadings

 From Michael Lichter To statalist@hsphsun2.harvard.edu Subject Re: st: RE: PCA vs. Factor Loadings Date Thu, 17 Dec 2009 09:56:18 -0500

```Thanks again, Nick. I've downloaded -cpcorr-. It will be helpful for
this project and elsewhere.

I now have a different but related problem that could be a bug but could
also represent a gap in my understanding of PCA (which would not be a
surprise).

Checking the correlations between the observed variables and the
extracted components requires the estimation of component scores using
-predict-. Once the component scores are estimated, it's easy to check
the correlation between components. There should be no correlation
between the initially-extracted components, and none between components
after orthogonal rotation. I found the former but not the latter; in
fact, my rotated components are all moderately correlated! The
correlations between components for a three-component model extracted
from the auto.dta data (program at end of this message) look like this:

|       c1       c2       c3
-------------+---------------------------
c1 |   1.0000
c2 |   0.6248   1.0000
c3 |  -0.4571  -0.4338   1.0000

What's going on? When I the same (give or take) factors using -factor,
pcf- and do the same orthogonal (varimax) rotation, the rotated factors
are, as expected, uncorrelated.

Does this indicate a bug in one or more of the relevant programs (-pca-,
-rotate-, or -predict-), or is there some aspect of PCA that I'm not
taking into account?

Thanks.

Re. Jay's response: Thanks to you also. I wasn't suggesting that the
results of -pca- and -factor- should look the same; I am/was only
looking to have results from the two be on comparable scales, which, as
both of you observed, is a function of the normalization used.

Michael

// ----- program to
//     - extract components/factors
//     - show correlations between vars and components/factors
//     - show correlations between components/factors
//     - compare -pca- results to -factor- results

sysuse auto

pca price mpg rep78 headroom trunk weight length displacement, mineigen(1)
predict c1 c2 c3
cpcorr price mpg rep78 headroom trunk weight length displacement \ c1-c3
corr c1-c3
rotate, varimax
drop c1-c3
predict c1 c2 c3
cpcorr price mpg rep78 headroom trunk weight length displacement \ c1-c3
corr c1-c3

factor price mpg rep78 headroom trunk weight length displacement, pcf
predict f1 f2 f3
cpcorr price mpg rep78 headroom trunk weight length displacement \ f1-f3
corr f1-f3
rotate, varimax
drop f1-f3
predict f1 f2 f3
cpcorr price mpg rep78 headroom trunk weight length displacement \ f1-f3
corr f1-f3

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```

 © Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index