From 8ebbf609a32c5dc24043c02559749e07695ece2b Mon Sep 17 00:00:00 2001 From: John Darrington Date: Fri, 1 Jul 2011 18:18:27 +0200 Subject: [PATCH] Change the order of the reported NPAR values in two sample related tests. This change makes the order of the reported values follow the order in which they were entered in the syntax. The changes to the tests affect only the order. The numbers are unchanged. --- src/language/stats/npar.c | 20 ++++++-------------- tests/language/stats/npar.at | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/src/language/stats/npar.c b/src/language/stats/npar.c index 2bc42934..d34ec119 100644 --- a/src/language/stats/npar.c +++ b/src/language/stats/npar.c @@ -888,14 +888,6 @@ npar_binomial (struct lexer *lexer, struct dataset *ds, } -static bool -parse_two_sample_related_test (struct lexer *lexer, - const struct dictionary *dict, - struct two_sample_test *test_parameters, - struct pool *pool - ); - - static bool parse_two_sample_related_test (struct lexer *lexer, const struct dictionary *dict, @@ -965,8 +957,8 @@ parse_two_sample_related_test (struct lexer *lexer, assert (n_vlist1 == n_vlist2); for ( i = 0 ; i < n_vlist1; ++i ) { - test_parameters->pairs[n][1] = vlist1[i]; - test_parameters->pairs[n][0] = vlist2[i]; + test_parameters->pairs[n][0] = vlist1[i]; + test_parameters->pairs[n][1] = vlist2[i]; n++; } } @@ -977,8 +969,8 @@ parse_two_sample_related_test (struct lexer *lexer, { for ( j = 0 ; j < n_vlist2; ++j ) { - test_parameters->pairs[n][1] = vlist1[i]; - test_parameters->pairs[n][0] = vlist2[j]; + test_parameters->pairs[n][0] = vlist1[i]; + test_parameters->pairs[n][1] = vlist2[j]; n++; } } @@ -992,8 +984,8 @@ parse_two_sample_related_test (struct lexer *lexer, for ( j = i + 1 ; j < n_vlist1; ++j ) { assert ( n < test_parameters->n_pairs); - test_parameters->pairs[n][1] = vlist1[i]; - test_parameters->pairs[n][0] = vlist1[j]; + test_parameters->pairs[n][0] = vlist1[i]; + test_parameters->pairs[n][1] = vlist1[j]; n++; } } diff --git a/tests/language/stats/npar.at b/tests/language/stats/npar.at index 57193c00..e9c118d8 100644 --- a/tests/language/stats/npar.at +++ b/tests/language/stats/npar.at @@ -526,13 +526,13 @@ AT_CHECK([pspp -o pspp.csv npar.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Ranks ,,N,Mean Rank,Sum of Ranks -second - first,Negative Ranks,5,8.60,43.00 -,Positive Ranks,8,6.00,48.00 +first - second,Negative Ranks,8,6.00,48.00 +,Positive Ranks,5,8.60,43.00 ,Ties,2,, ,Total,15,, Table: Test Statistics -,second - first +,first - second Z,-.18 Asymp. Sig. (2-tailed),.86 Exact Sig. (2-tailed),.89 @@ -575,13 +575,13 @@ dnl This is the same output as the previous test. AT_CHECK([cat pspp.csv], [0], [dnl Table: Ranks ,,N,Mean Rank,Sum of Ranks -second - first,Negative Ranks,5,8.60,43.00 -,Positive Ranks,8,6.00,48.00 +first - second,Negative Ranks,8,6.00,48.00 +,Positive Ranks,5,8.60,43.00 ,Ties,2,, ,Total,15,, Table: Test Statistics -,second - first +,first - second Z,-.18 Asymp. Sig. (2-tailed),.86 Exact Sig. (2-tailed),.89 @@ -615,17 +615,17 @@ dnl (see bug #31611). AT_CHECK([sed 's/\.313$/.312/' pspp.csv], [0], [dnl Table: Frequencies ,,N -height - age,Negative Differences,1 -,Positive Differences,3 +age - height,Negative Differences,3 +,Positive Differences,1 ,Ties,2 ,Total,6 -rank - height,Negative Differences,3 -,Positive Differences,2 +height - rank,Negative Differences,2 +,Positive Differences,3 ,Ties,1 ,Total,6 Table: Test Statistics -,height - age,rank - height +,age - height,height - rank Exact Sig. (2-tailed),.625,1.000 Exact Sig. (1-tailed),.312,.500 Point Probability,.250,.312 -- 2.30.2