Plotting a line representing Spearman's correlation on a scatterplot

19 Ansichten (letzte 30 Tage)
Joshua Kugel
Joshua Kugel am 22 Okt. 2020
Beantwortet: Jeff Miller am 23 Okt. 2020
I would like to plot a line reflecting the Spearman's correlation on a scatterplot. Is this possible?
At the moment, I'm plotting a robust regression line but sometimes the slope is clearly different from the Spearman's correlation. Hence this isn't a great solution.
Thanks in advance!

Antworten (1)

Jeff Miller
Jeff Miller am 23 Okt. 2020
I'm not sure a mismatch between slope and correlation is necessarily a problem. Note that the slope doesn't equal the correlation with Pearson's r either, except when the variables are standardized to have equal variance.
More generally, no, I don't think its too meaningful to put a line on the scatterplot to represent a Spearman correlation. Such a line implicitly reflects a linear scaling within X and within Y, whereas Spearman only assumes ordinality within each of X and Y.

Kategorien

Mehr zu Descriptive Statistics finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by