X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fbinomial.c;h=5022cebddd35dbe98994ff193e878e6dcb87d4dd;hb=3e3468c33112e7430f3fc0e1e7eca06b29ee9c0e;hp=39b8506d53edb7f184df01831522e0da7511217e;hpb=c41f14854e73ad44824b54933ae96eb52f781fc2;p=pspp diff --git a/src/language/stats/binomial.c b/src/language/stats/binomial.c index 39b8506d53..5022cebddd 100644 --- a/src/language/stats/binomial.c +++ b/src/language/stats/binomial.c @@ -41,7 +41,6 @@ #include #include -#include #include @@ -79,7 +78,7 @@ calculate_binomial_internal (double n1, double n2, double p) /* SPSS Statistical Algorithms has completely different and WRONG advice here. */ - double sig1tailed = gslextras_cdf_binomial_P (n1, n1 + n2, p); + double sig1tailed = gsl_cdf_binomial_P (n1, p, n1 + n2); if ( p == 0.5 ) return sig1tailed > 0.5 ? 1.0 :sig1tailed * 2.0; @@ -120,14 +119,14 @@ do_binomial (const struct dictionary *dict, cat1[v].value = value_dup (value, width); cat1[v].count = w; } - else if ( 0 == compare_values (cat1[v].value, value, width)) + else if ( 0 == compare_values (cat1[v].value, value, var)) cat1[v].count += w; else if ( NULL == cat2[v].value ) { cat2[v].value = value_dup (value, width); cat2[v].count = w; } - else if ( 0 == compare_values (cat2[v].value, value, width)) + else if ( 0 == compare_values (cat2[v].value, value, var)) cat2[v].count += w; else if ( bst->category1 == SYSMIS) msg (ME, _("Variable %s is not dichotomous"), var_get_name (var)); @@ -144,7 +143,9 @@ void binomial_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, - const struct npar_test *test) + const struct npar_test *test, + bool exact UNUSED, + double timer UNUSED) { int v; const struct binomial_test *bst = (const struct binomial_test *) test;