3

I have two variables which show significant correlation (Spearman). I would like to graphically show the strength of the relationship, much like showing a linear regression fit with confidence bands. What would be the best correct way of doing that?

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
January
  • 6,999
  • 1
  • 32
  • 55

1 Answers1

6

Two options come to mind. What I would prefer is a scatter plot of X against Y with a non-parametric smoother, such as LOESS, to show the general trend between them. It doesn't directly correspond to a rank correlation, but since the Spearman correlation is a measure of monotonic trend, you can eyeball a non-parametric smooth curve to determine just how monotonic it is. Alternately, you can plot the data ranks on the X and Y axes and fit a linear regression line through it, because that's all the Spearman correlation is.

Note that Pearson correlation is directly related to the simple linear regression model, so plotting the fitted line with the p-value for the test of correlation would be much more concordant and easy to understand! The test of whether the pearson correlation is equal to zero is the same as the test for whether or not the slope parameter is equal to zero. This is one of many reasons that I favor using Pearson correlation over Spearman.

AdamO
  • 52,330
  • 5
  • 104
  • 209