Change the order of the reported NPAR values in two sample related tests.
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 1 Jul 2011 16:18:27 +0000 (18:18 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 1 Jul 2011 16:18:27 +0000 (18:18 +0200)
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
tests/language/stats/npar.at

index 2bc42934a381b9798f18a0b1142524fd967445d3..d34ec11932e5ffdd204b00f8a1fe850b3b873821 100644 (file)
@@ -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++;
            }
        }
index 57193c00685249db3f24bbbbf8e064bc6144a422..e9c118d8c5bed7f7da417025acd984328d3b664e 100644 (file)
@@ -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