Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: PCA components independent?


From   n j cox <[email protected]>
To   [email protected]
Subject   Re: st: PCA components independent?
Date   Tue, 22 Mar 2005 12:02:55 +0000

There are various issues intertwined here.

1. Uncorrelated does not necessarily mean independent.
For example, a quadratic relation could yield a
zero correlation, depending on marginal distribution,
but it would show dependence nevertheless.

2. Spearman correlation measures strength of monotonic
relationship, not strength of linear relationship.
Many texts have little zoos of scatter plots showing
examples in which Pearson and Spearman give similar
results, and examples in which they do not.

3. In order to understand what is going on
in your data, -scatter f1 f2-.

N.B. -score- is a command, not an option.

Martell, Rodolfo

After running the PCA command in 9 time series, I use the SCORE option
to extract the first two common components. This is what I do:

. pca s*, fa(2)
. score f1 f2

What puzzles me is the following:

. spearman f1 f2
  Number of obs =      61
Spearman's rho =       0.3477
 Test of Ho: f1sov and f2sov are independent
    Prob > |t| =       0.0060

Where I reject independence. I thought that by construction, they should
be orthogonal. A regular PWCORR command produces the following output:

. pwcorr f1 f2, sig

          |    f1       f2
-------------+---------------------
       f1 |   1.0000
          |
          |
       f2 |  -0.0000   1.0000
          |   1.0000


Where correlation is zero but p-value is 1. Any ideas as to why
spearman's test fails to reject independence and I get such p-value in
the regular correlation command?

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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