# Analysis of compounds using PCA - selecting the right PCA “type” for the data…?

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".

• 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?). – Nick Cox Jul 1 '13 at 7:52
• Correction: There are different formulas for correlation, but they are different versions of each other. – Nick Cox Jul 1 '13 at 8:28
• +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. – ttnphns Jul 1 '13 at 8:32
• 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. – ttnphns Jul 1 '13 at 8:41
• 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. – whuber Jul 1 '13 at 21:56

• 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. – Oleic Jul 1 '13 at 5:21
• 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". – ttnphns Jul 1 '13 at 9:05