What method can I use to test if there is a correlation between two sets of data? The correlation coefficient works if there is a linear association, but if I have two sets that are clearly (visually by graph) correlated in a non-linear way, how can I test that? Is there a coefficient or a special method?

**Contents**hide

#### Best Answer

In case of non-linear correlation Spearman's Rank-correlation is one method

and one more method is called Kendall's Tau

R code for Spearman's rank correlation:

`cor(X, Y ,method= "spearman") `

R code for Kendall's rank correlation:

`cor(X, Y ,method= "kendall") `

### Similar Posts:

- Solved – Equivalent to Spearman correlation for non-monotonic data
- Solved – Correlation between features Pearson vs Spearman
- Solved – Correlation between features Pearson vs Spearman
- Solved – Correlation between features Pearson vs Spearman
- Solved – Measuring correlation or dependence between two data sets