1 AT_BANNER([CROSSTABS procedure])
3 AT_SETUP([CROSSTABS integer mode crash])
4 AT_DATA([crosstabs.sps],
5 [DATA LIST LIST /A * B * X * Y * .
10 CROSSTABS VARIABLES X (1,7) Y (1,7) /TABLES X BY Y.
12 AT_CHECK([pspp -O format=csv crosstabs.sps], [0],
13 [[Table: Reading free-form data from INLINE.
22 ,Valid,,Missing,,Total,
23 ,N,Percent,N,Percent,N,Percent
24 X * Y,1,100.0%,0,0.0%,1,100.0%
28 X,1.00,2.00,3.00,4.00,5.00,6.00,7.00,Total
29 1.00,.0,.0,.0,.0,.0,.0,.0,.0
30 2.00,.0,.0,.0,.0,.0,.0,.0,.0
31 3.00,.0,.0,.0,.0,.0,.0,.0,.0
32 4.00,.0,.0,.0,.0,1.0,.0,.0,1.0
33 5.00,.0,.0,.0,.0,.0,.0,.0,.0
34 6.00,.0,.0,.0,.0,.0,.0,.0,.0
35 7.00,.0,.0,.0,.0,.0,.0,.0,.0
36 Total,.0,.0,.0,.0,1.0,.0,.0,1.0
41 AT_SETUP([CROSSTABS long string crash])
42 AT_DATA([crosstabs.sps],
43 [data list list /x * y (a18).
54 CROSSTABS /TABLES = x BY y.
56 AT_CHECK([pspp -o - -O format=csv crosstabs.sps], [0],
57 [[Table: Reading free-form data from INLINE.
62 "crosstabs.sps:4: warning: BEGIN DATA: Missing value(s) for all variables from x onward. These will be filled with the system-missing value or blanks, as appropriate."
64 "crosstabs.sps:6: warning: BEGIN DATA: Missing value(s) for all variables from x onward. These will be filled with the system-missing value or blanks, as appropriate."
68 ,Valid,,Missing,,Total,
69 ,N,Percent,N,Percent,N,Percent
70 x * y,4,66.7%,2,33.3%,6,100.0%
74 x,one unity ,three lots ,two duality ,zero none ,Total
75 1.00,1.0,.0,.0,1.0,2.0
78 Total,1.0,1.0,1.0,1.0,4.0
82 AT_SETUP([CROSSTABS crash])
83 AT_DATA([crosstabs.sps],
104 CROSSTABS TABLES y by z.
106 AT_CHECK([pspp -O format=csv crosstabs.sps], [0],
107 [[Table: Reading 1 record from INLINE.
108 Variable,Record,Columns,Format
127 ,Valid,,Missing,,Total,
128 ,N,Percent,N,Percent,N,Percent
129 y * z,9,100.0%,0,0.0%,9,100.0%
131 Table: y * z [count].
140 # Bug #26739, which caused CROSSTABS to crash or to fail to output
141 # chi-square results.
142 AT_SETUP([CROSSTABS chi-square crash])
143 AT_DATA([crosstabs.sps],
144 [[DATA LIST LIST /x * y *.
156 AT_CHECK([pspp -O format=csv crosstabs.sps], [0],
157 [[Table: Reading free-form data from INLINE.
164 ,Valid,,Missing,,Total,
165 ,N,Percent,N,Percent,N,Percent
166 x * y,4,100.0%,0,0.0%,4,100.0%
168 Table: x * y [count].
176 Table: Chi-square tests.
177 Statistic,Value,df,Asymp. Sig. (2-tailed)
178 Pearson Chi-Square,2.00,2,.37
179 Likelihood Ratio,2.77,2,.25
180 Linear-by-Linear Association,.27,1,.60
186 AT_SETUP([CROSSTABS crash with SPLIT FILE])
187 AT_DATA([crosstabs.sps],
188 [data list notable / v0 to v2 1-6 (A)
202 SPLIT FILE SEPARATE BY v0.
206 /FORMAT=AVALUE LABELS TABLES PIVOT
208 /CELLS=COUNT ROW COLUMN TOTAL.
210 AT_CHECK([pspp -O format=csv crosstabs.sps], [0],
211 [[Variable,Value,Label
216 ,Valid,,Missing,,Total,
217 ,N,Percent,N,Percent,N,Percent
218 v1 * v2,6,100.0%,0,0.0%,6,100.0%
220 "Table: v1 * v2 [count, row %, column %, total %]."
233 ,100.0%,100.0%,100.0%
236 Table: Chi-square tests.
237 Statistic,Value,df,Asymp. Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed)
238 Pearson Chi-Square,.38,1,.54,,
239 Likelihood Ratio,.37,1,.54,,
240 Fisher's Exact Test,,,,1.00,.60
241 Continuity Correction,.00,1,1.00,,
242 N of Valid Cases,6,,,,
249 ,Valid,,Missing,,Total,
250 ,N,Percent,N,Percent,N,Percent
251 v1 * v2,4,100.0%,0,0.0%,4,100.0%
253 "Table: v1 * v2 [count, row %, column %, total %]."
266 ,100.0%,100.0%,100.0%
269 Table: Chi-square tests.
270 Statistic,Value,df,Asymp. Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed)
271 Pearson Chi-Square,.44,1,.50,,
272 Likelihood Ratio,.68,1,.41,,
273 Fisher's Exact Test,,,,1.00,.75
274 Continuity Correction,.00,1,1.00,,
275 N of Valid Cases,4,,,,
280 AT_SETUP([3-way CROSSTABS])
281 AT_DATA([crosstabs.sps],
302 CROSSTABS TABLES x by y by z.
304 AT_CHECK([pspp -O format=csv crosstabs.sps], [0],
305 [[Table: Reading 1 record from INLINE.
306 Variable,Record,Columns,Format
325 ,Valid,,Missing,,Total,
326 ,N,Percent,N,Percent,N,Percent
327 x * y * z,9,100.0%,0,0.0%,9,100.0%
329 Table: x * y * z [count].
348 AT_SETUP([CROSSTABS descending sort order])
349 AT_DATA([crosstabs-descending.sps],
350 [[DATA LIST NOTABLE LIST /x * y *.
365 AT_CHECK([pspp -O format=csv crosstabs-descending.sps], [0],
368 ,Valid,,Missing,,Total,
369 ,N,Percent,N,Percent,N,Percent
370 x * y,6,100.0%,0,0.0%,6,100.0%
372 Table: x * y [count].
383 AT_SETUP([CROSSTABS crash when all cases missing])
384 AT_DATA([crosstabs.sps], [dnl
385 DATA LIST LIST NOTABLE /X1 X2.
390 MISSING VALUES x2 (1).
392 CROSSTABS /TABLES= X1 by X2.
394 AT_CHECK([pspp -O format=csv crosstabs.sps], [0], [dnl
397 ,Valid,,Missing,,Total,
398 ,N,Percent,N,Percent,N,Percent
399 X1 * X2,0,0.0%,1,100.0%,1,100.0%
401 crosstabs.sps:8: warning: CROSSTABS: Crosstabulation X1 * X2 contained no non-missing cases.