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?

  • $\begingroup$ en.wikipedia.org/wiki/Distance_correlation $\endgroup$ – ttnphns Jun 4 '14 at 14:33
  • $\begingroup$ One small note: if you test for something because you had discovered it previously (eg, in a graph), the test is not truly valid. $\endgroup$ – gung - Reinstate Monica Jun 4 '14 at 14:39
  • $\begingroup$ What is the nature of the non-linearity? Is the relationship monotonic, eg? $\endgroup$ – gung - Reinstate Monica Jun 4 '14 at 14:40
  • $\begingroup$ no its not monotonic $\endgroup$ – AnarKi Jun 5 '14 at 8:12
  • $\begingroup$ Can you put the rather crucial information that it's not monotonic in your question? Can you plot the data? $\endgroup$ – Glen_b -Reinstate Monica Jul 7 '14 at 15:04

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

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.