for numeric columns cor.py $input1 $out_file1 $numeric_columns $method rpy .. class:: infomark **TIP:** If your data is not TAB delimited, use *Text Manipulation->Convert* .. class:: warningmark Missing data ("nan") removed from each pairwise comparison ----- **Syntax** This tool computes the matrix of correlation coefficients between numeric columns. - All invalid, blank and comment lines are skipped when performing computations. The number of skipped lines is displayed in the resulting history item. - **Pearson's Correlation** reflects the degree of linear relationship between two variables. It ranges from +1 to -1. A correlation of +1 means that there is a perfect positive linear relationship between variables. The formula for Pearson's correlation is: .. image:: ../static/images/pearson.png where n is the number of items - **Kendall's rank correlation** is used to measure the degree of correspondence between two rankings and assessing the significance of this correspondence. The formula for Kendall's rank correlation is: .. image:: ../static/images/kendall.png where n is the number of items, and P is the sum. - **Spearman's rank correlation** assesses how well an arbitrary monotonic function could describe the relationship between two variables, without making any assumptions about the frequency distribution of the variables. The formula for Spearman's rank correlation is .. image:: ../static/images/spearman.png where D is the difference between the ranks of corresponding values of X and Y, and N is the number of pairs of values. ----- **Example** - Input file:: #Person Height Self Esteem 1 68 4.1 2 71 4.6 3 62 3.8 4 75 4.4 5 58 3.2 6 60 3.1 7 67 3.8 8 68 4.1 9 71 4.3 10 69 3.7 11 68 3.5 12 67 3.2 13 63 3.7 14 62 3.3 15 60 3.4 16 63 4.0 17 65 4.1 18 67 3.8 19 63 3.4 20 61 3.6 - Computing the correlation coefficients between columns 2 and 3 of the above file (using Pearson's Correlation), the output is:: 1.0 0.730635686279 0.730635686279 1.0 So the correlation for our twenty cases is .73, which is a fairly strong positive relationship.