Total,2.0,2.0,4.0
Table: Chi-square tests.
-Statistic,Value,df,Asymp. Sig. (2-sided)
+Statistic,Value,df,Asymp. Sig. (2-tailed)
Pearson Chi-Square,2.00,2,.37
Likelihood Ratio,2.77,2,.25
Linear-by-Linear Association,.27,1,.60
,66.7%,33.3%,100.0%
Table: Chi-square tests.
-Statistic,Value,df,Asymp. Sig. (2-sided),Exact Sig. (2-sided),Exact Sig. (1-sided)
+Statistic,Value,df,Asymp. Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed)
Pearson Chi-Square,.38,1,.54,,
Likelihood Ratio,.37,1,.54,,
Fisher's Exact Test,,,,1.00,.60
,25.0%,75.0%,100.0%
Table: Chi-square tests.
-Statistic,Value,df,Asymp. Sig. (2-sided),Exact Sig. (2-sided),Exact Sig. (1-sided)
+Statistic,Value,df,Asymp. Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed)
Pearson Chi-Square,.44,1,.50,,
Likelihood Ratio,.68,1,.41,,
Fisher's Exact Test,,,,1.00,.75
N of Valid Cases,4,,,,
]])
AT_CLEANUP
+
+# Bug #24752.
+AT_SETUP([3-way CROSSTABS])
+AT_DATA([crosstabs.sps],
+ [[DATA LIST FIXED
+ / x 1-2
+ y 3
+ z 4.
+
+BEGIN DATA.
+0111
+0222
+0311
+0412
+0521
+0612
+0711
+0811
+0912
+END DATA.
+
+LIST.
+
+
+CROSSTABS TABLES x by y by z.
+]])
+AT_CHECK([pspp -O format=csv crosstabs.sps], [0],
+ [[Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+x,1,1- 2,F2.0
+y,1,3- 3,F1.0
+z,1,4- 4,F1.0
+
+Table: Data List
+x,y,z
+1,1,1
+2,2,2
+3,1,1
+4,1,2
+5,2,1
+6,1,2
+7,1,1
+8,1,1
+9,1,2
+
+Table: Summary.
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+x * y * z,9,100.0%,0,0.0%,9,100.0%
+
+Table: x * y * z [count].
+z,,y,,
+,x,1,2,Total
+1,1,1.0,.0,1.0
+,3,1.0,.0,1.0
+,5,.0,1.0,1.0
+,7,1.0,.0,1.0
+,8,1.0,.0,1.0
+Total,,4.0,1.0,5.0
+2,2,.0,1.0,1.0
+,4,1.0,.0,1.0
+,6,1.0,.0,1.0
+,9,1.0,.0,1.0
+Total,,3.0,1.0,4.0
+]])
+AT_CLEANUP
+
+
+
+AT_SETUP([CROSSTABS descending sort order])
+AT_DATA([crosstabs-descending.sps],
+ [[DATA LIST NOTABLE LIST /x * y *.
+BEGIN DATA.
+2 2
+2 2
+3 1
+4 1
+3 2
+3 2
+END DATA.
+
+CROSSTABS
+ /TABLES= x BY y
+ /FORMAT = DVALUE.
+]])
+
+AT_CHECK([pspp -O format=csv crosstabs-descending.sps], [0],
+ [[Table: Summary.
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+x * y,6,100.0%,0,0.0%,6,100.0%
+
+Table: x * y [count].
+,y,,
+x,2.00,1.00,Total
+4.00,.0,1.0,1.0
+3.00,2.0,1.0,3.0
+2.00,2.0,.0,2.0
+Total,4.0,2.0,6.0
+]])
+AT_CLEANUP