From: John Darrington Date: Mon, 25 Oct 2010 18:54:54 +0000 (+0200) Subject: Mann-Whitney: Change the rank sum used for Wilcoxon W X-Git-Tag: v0.7.7~179 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6259145c57dbef83bbe9fc0d90d35ed14a95a96;p=pspp-builds.git Mann-Whitney: Change the rank sum used for Wilcoxon W --- diff --git a/src/language/stats/mann-whitney.c b/src/language/stats/mann-whitney.c index b837177b..94cb1ceb 100644 --- a/src/language/stats/mann-whitney.c +++ b/src/language/stats/mann-whitney.c @@ -121,11 +121,11 @@ mann_whitney_execute (const struct dataset *ds, mwv->u += mwv->n[0] * (mwv->n[0] + 1) / 2.0; mwv->u -= mwv->rank_sum[0]; - mwv->w = mwv->rank_sum[0]; + mwv->w = mwv->rank_sum[1]; if ( mwv->u > mwv->n[0] * mwv->n[1] / 2.0) { mwv->u = mwv->n[0] * mwv->n[1] - mwv->u; - mwv->w = mwv->rank_sum[1]; + mwv->w = mwv->rank_sum[0]; } mwv->z = mwv->u - mwv->n[0] * mwv->n[1] / 2.0; n = mwv->n[0] + mwv->n[1];