The sense of Spearman is reversed

Posted By: GPEngine

The sense of Spearman is reversed - 03/27/15 06:21

Zorro's Spearman returns high values when input series is steadily decreasing and low values when input series is steadily increasing. Someone implemented it backwards. I think it's because series index is in reverse order.

The correct implementation is something like
Code:
var d = ((Period - Idx[g_count] - 1) - g_count);
sum += d * d;

Posted By: GPEngine

Re: The sense of Spearman is reversed - 03/28/15 03:09

Alternatively you could implement sortIdx(..., reverse=true)
Posted By: boatman

Re: The sense of Spearman is reversed - 03/31/15 08:01

That's really good to know GP! +1 for fixing this in the next release, or updating the manual to reflect.
Posted By: jcl

Re: The sense of Spearman is reversed - 03/31/15 09:15

Thanks for the info!
© 2024 lite-C Forums