by
84k 18
0
4
1,779
2
Top 1% !
Famous
Tagged
Specified
Popularity: 14615th place

Published on:

Architecturex86_64
LanguageC#
Windows VersionWindows7

WMinimum: Computes the Wilcoxon's W statistic.

Computes the Wilcoxon's W statistic.

 
<remarks>
  The W statistic is computed as the
  minimum of the W+ and W- statistics.
</remarks>
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/1456191/WMinimum--Computes-the-Wilcoxon-s-W-stat?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
/// <summary> /// Computes the Wilcoxon's W statistic. /// </summary> /// /// <remarks> /// The W statistic is computed as the /// minimum of the W+ and W- statistics. /// </remarks> /// public static double WMinimum(int[] signs, double[] ranks) { double wp = 0, wn = 0; for (int i = 0; i < signs.Length; i++) { if (signs[i] < 0) wn += ranks[i]; else if (signs[i] > 0) wp += ranks[i]; } double min = Math.Min(wp, wn); return min; }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus