dnl PSPP - a program for statistical analysis.
-dnl Copyright (C) 2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2017, 2022 Free Software Foundation, Inc.
dnl
dnl This program is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl The result should be the same as before
AT_CHECK([diff pspp.csv pspp2.csv], [0])
+dnl Reverse the order of the group values
+AT_DATA([kw-reverse-group.sps], [dnl
+set format = F9.3.
+
+data list notable list /gv * xscore *.
+begin data
+1 96
+1 128
+1 83
+1 61
+1 101
+2 82
+2 124
+2 132
+2 135
+2 109
+3 115
+3 149
+3 166
+3 147
+end data.
+
+value label /gv
+ 1 "timed out"
+ 2 "hit wicket"
+ 3 "handled the ball".
+
+npar tests
+ /kruskal-wallis xscore by gv (3, 1)
+ /missing=exclude
+ .
+])
+
+AT_CHECK([pspp -o pspp2.csv kw-reverse-group.sps])
+
+dnl The result should be the same as before
+AT_CHECK([diff pspp.csv pspp2.csv], [0])
+
AT_CLEANUP
Total Cases,486.0000
Number of Runs,12
Z,-20.9931
-Asymp. Sig. (2-tailed),2.000
+Asymp. Sig. (2-tailed),.000
Table: Runs Test
,score
Total Cases,486.0000
Number of Runs,12
Z,-21.0650
-Asymp. Sig. (2-tailed),2.000
+Asymp. Sig. (2-tailed),.000
Table: Runs Test
,score
Total Cases,486.0000
Number of Runs,11
Z,-21.0742
-Asymp. Sig. (2-tailed),2.000
+Asymp. Sig. (2-tailed),.000
])
AT_CLEANUP
dnl Check for a bug where the ranks were inappropriately allocated, when
dnl multiple variables were tested and MISSING=ANALYSIS chosen.
-cp $abs_srcdir/language/mann-whitney.txt .
+cp "$abs_srcdir/language/mann-whitney.txt" .
AT_DATA([npar-mann-whitney.sps], [dnl
SET FORMAT = F11.3
AT_CHECK([pspp -O format=csv mcnemar.sps], [0], [dnl
Table: v1 & v2
-,v2,
-v1,.000,1.000
+v1,v2,
+,.000,1.000
.000,4,9
1.000,2,5
Table: v1 & junk
-,junk,
-v1,.000,1.000
+v1,junk,
+,.000,1.000
.000,8,5
1.000,2,5
AT_CHECK([pspp -O format=csv mcnemar.sps], [0], [dnl
Table: var1 & var2
-,var2,
-var1,0,1
+var1,var2,
+,0,1
0,9,8
1,1,5
var1 & var2,23,.039,.020,.02
Table: var2 & var1
-,var1,
-var2,0,1
+var2,var1,
+,0,1
0,9,1
1,8,5