X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fnpar.c;h=af41b104731665e4adb4202d609de00fa8f77a7d;hb=7dfbf1beae10727cc07213b2c74a991859f9fcbc;hp=8d40faad0144bd9c327ee8a39c0784d5a5da0279;hpb=ec19587bd09b05588cd757533e5366d1e2fbf447;p=pspp diff --git a/src/language/stats/npar.c b/src/language/stats/npar.c index 8d40faad01..af41b10473 100644 --- a/src/language/stats/npar.c +++ b/src/language/stats/npar.c @@ -155,22 +155,26 @@ static int parse_npar_tests (struct lexer *lexer, struct dataset *ds, struct cmd_npar_tests *npt, struct npar_specs *nps) { - npt->binomial = 0; npt->chisquare = 0; - npt->ks_one_sample = 0; npt->cochran = 0; + npt->binomial = 0; + npt->ks_one_sample = 0; + npt->wilcoxon = 0; + npt->sign = 0; + npt->runs = 0; npt->friedman = 0; + npt->kendall = 0; npt->kruskal_wallis = 0; npt->mann_whitney = 0; - npt->jonckheere_terpstra = 0; npt->mcnemar = 0; - npt->runs = 0; - npt->sign = 0; - npt->wilcoxon = 0; - npt->missing = 0; + npt->median = 0; + npt->jonckheere_terpstra = 0; + npt->miss = MISS_ANALYSIS; + npt->missing = 0; npt->method = 0; npt->statistics = 0; + memset (npt->a_statistics, 0, sizeof npt->a_statistics); for (;;) { @@ -1076,7 +1080,7 @@ parse_two_sample_related_test (struct lexer *lexer, if (!parse_variables_const_pool (lexer, pool, dict, &vlist1, &n_vlist1, - PV_NUMERIC | PV_NO_SCRATCH | PV_NO_DUPLICATE) ) + PV_NUMERIC | PV_NO_SCRATCH | PV_DUPLICATE) ) return false; if ( lex_match (lexer, T_WITH)) @@ -1084,7 +1088,7 @@ parse_two_sample_related_test (struct lexer *lexer, with = true; if ( !parse_variables_const_pool (lexer, pool, dict, &vlist2, &n_vlist2, - PV_NUMERIC | PV_NO_SCRATCH | PV_NO_DUPLICATE) ) + PV_NUMERIC | PV_NO_SCRATCH | PV_DUPLICATE) ) return false; paired = (lex_match (lexer, T_LPAREN) && @@ -1097,9 +1101,12 @@ parse_two_sample_related_test (struct lexer *lexer, if (paired) { if ( n_vlist1 != n_vlist2) - msg (SE, _("PAIRED was specified but the number of variables " + { + msg (SE, _("PAIRED was specified but the number of variables " "preceding WITH (%zu) did not match the number " "following (%zu)."), n_vlist1, n_vlist2); + return false; + } test_parameters->n_pairs = n_vlist1 ; }