I'm completing scientific analysis of chemical compounds in consumer products. As a non-statistician, I would really appreciate any thoughts from the experts here.

My data is non-normal so I've used non-parametric tests like MW and KW for hypothesis testing between samples so far. However I now have to conduct a principal component analysis (PCA) of the different compounds measured in the different products (measured in different units).

The stats add-in I was using asks that the type of data format be specified (eg: observation/variable table, versus a correlation or covariance matrix). I'm working with straight data so used the observation/variable table set-up.

But it also asks me to specify the PCA type from the following options (Pearson(n), Pearson (n-1), Spearman, Kendall, Covariance...). I tested the same data set with the Pearson (n) option and the Spearman option and got very different eigenalues and eigenvectors. The final biplot is naturally quite different.

Any help someone can provide regarding what the difference is, and what PCA type should be used would be greatly appreciated.

UPDATE: I was using XLSTAT (an Excel add-in). Is it okay to use Pearson as the "PCA type" when the correlations between the variables are non-linear? For example this "PCA type" option does not appear in other stats programs (eg: SPSS). So for example if using SPSS, the novice user would by default use Pearson "pca type".

  • 1
    $\begingroup$ This sounds very odd in implying that Pearson (n) and Pearson (n-1) are different. There aren't different formulas or ideas for Pearson correlation. There are different formulas for standard deviation, but it's immaterial which you use for Pearson correlation as identical terms cancel in numerator and denominator. This may sound like a minute detail, but it could be diagnostic of poor software. All you say is that is an "add-in" (to what? MS Excel?). $\endgroup$ – Nick Cox Jul 1 '13 at 7:52
  • $\begingroup$ Correction: There are different formulas for correlation, but they are different versions of each other. $\endgroup$ – Nick Cox Jul 1 '13 at 8:28
  • $\begingroup$ +1 to @Nick. Whether you choose n or n-1 for your standard deviation, Pearson r is the same afterwards. Because r is just a cosine for centered variables, which formula doesn't include df term; so your implicit using of df is being canceled out. $\endgroup$ – ttnphns Jul 1 '13 at 8:32
  • $\begingroup$ Also, option Kendall is suspicious. Linear PCs are linear combinations of data values - original or transformed, - which implies that the association measure must be of SSCP type. Pearson r is; Spearman rho also is, being just r on ranks. But Kendall tau doesn't seem to be r or cosine of some data. Using Kendall in PCA is not justified. $\endgroup$ – ttnphns Jul 1 '13 at 8:41
  • 1
    $\begingroup$ For chemical concentrations, your reflex--and default approach--should be to analyze their logarithms. This is (in part) because the logarithms are what enter linearly in equations of chemical equilibria rather than the concentrations themselves. $\endgroup$ – whuber Jul 1 '13 at 21:56

The principal vectors are the eigenvectors of the the matrix you choose. When you choose Pearson you are choosing to find the eigenvectors of the Pearson correlation matrix. When you choose Spearman you are choosing to find the eigenvectors of the Spearman rank correlation matrix. The Spearman rank correlation is just the Pearson correlation between the ranked variables.

Due to the major difference in the nature of these matrices, it makes sense that the produced biplots are very different. If you really believe that the correlation between your variables is linear then I would stick with Pearson, otherwise I would go with Spearman or Kendall.

  • $\begingroup$ Thanks @Jorge. I am testing ~6 variables and the correlation is linear between some but not others (although I'm not sure if testing in pairs is the best way to test linearity, is there another way to do this?). The results make more "scientific" sense with Spearman however. $\endgroup$ – Oleic Jul 1 '13 at 4:54
  • 1
    $\begingroup$ The Spearman correlation will capture the linear correlations that the Pearson correlation captures between the non-ranked transformed variables, along with some nonlinear correlations. Also, correlation matrices only capture pairwise interactions. It seems to me that the loading you obtain from PCA are your primary interest, so I would just stick to the Spearman correlation. It is not clear to me why you want to capture higher order interactions between your variables. $\endgroup$ – Jorge Banuelos Jul 1 '13 at 5:03
  • $\begingroup$ Thanks. Looking at multiple chemical compounds (my variables) in different material `phases'. The variables can be used in different combinations with each other so we wanted to see if there were patterns between all the compounds. Not actually convinced PCA is the best way to do this, but it seems to be popular approach currently in my field. $\endgroup$ – Oleic Jul 1 '13 at 5:21
  • $\begingroup$ The Spearman rank correlation is just the Pearson correlation between the ranked variables. A continuation suggests itself: "And thence the principal components out of Spearman matrix correspond to those ranked data and nor to the original data". $\endgroup$ – ttnphns Jul 1 '13 at 9:05
  • $\begingroup$ Isn't Spearman-based also more robust for non-normally-distributed data? $\endgroup$ – gerrit Dec 16 '15 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.