1 dnl PSPP - a program for statistical analysis.
2 dnl Copyright (C) 2017 Free Software Foundation, Inc.
4 dnl This program is free software: you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation, either version 3 of the License, or
7 dnl (at your option) any later version.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
17 AT_BANNER([CROSSTABS procedure])
19 AT_SETUP([CROSSTABS integer mode crash])
20 AT_DATA([crosstabs.sps],
21 [DATA LIST LIST /A * B * X * Y * .
26 CROSSTABS VARIABLES X (1,7) Y (1,7) /TABLES X BY Y.
28 AT_CHECK([pspp -o pspp.csv -o pspp.txt crosstabs.sps])
29 AT_CHECK([cat pspp.csv], [0],
30 [[Table: Reading free-form data from INLINE.
39 ,Valid,,Missing,,Total,
40 ,N,Percent,N,Percent,N,Percent
41 X × Y,1,100.0%,0,.0%,1,100.0%
44 ,,,Y,,,,,,,Total
45 ,,,1.00,2.00,3.00,4.00,5.00,6.00,7.00,
46 X,1.00,Count,0,0,0,0,0,0,0,0
47 ,2.00,,0,0,0,0,0,0,0,0
48 ,3.00,,0,0,0,0,0,0,0,0
49 ,4.00,,0,0,0,0,1,0,0,1
50 ,5.00,,0,0,0,0,0,0,0,0
51 ,6.00,,0,0,0,0,0,0,0,0
52 ,7.00,,0,0,0,0,0,0,0,0
53 Total,,,0,0,0,0,1,0,0,1
58 AT_SETUP([CROSSTABS integer mode crash 2])
59 AT_DATA([crosstabs.sps], [dnl
66 VARIABLES x (1,3) y (1,7)
69 AT_CHECK([pspp -O format=csv crosstabs.sps], [0],
70 [[Table: Reading free-form data from INLINE.
77 ,Valid,,Missing,,Total,
78 ,N,Percent,N,Percent,N,Percent
79 x × y,0,.0%,1,100.0%,1,100.0%
88 AT_SETUP([CROSSTABS long string crash])
89 AT_DATA([crosstabs.sps],
90 [data list list /x * y (a18).
101 CROSSTABS /TABLES = x BY y.
103 AT_CHECK([pspp -o - -O format=csv -o pspp.txt crosstabs.sps], [0],
104 [[Table: Reading free-form data from INLINE.
109 "crosstabs.sps:4: warning: Missing value(s) for all variables from x onward. These will be filled with the system-missing value or blanks, as appropriate."
111 "crosstabs.sps:6: warning: Missing value(s) for all variables from x onward. These will be filled with the system-missing value or blanks, as appropriate."
115 ,Valid,,Missing,,Total,
116 ,N,Percent,N,Percent,N,Percent
117 x × y,4,66.7%,2,33.3%,6,100.0%
121 ,,,one unity,three lots,two duality,zero none,
122 x,1.00,Count,1,0,0,1,2
129 AT_SETUP([CROSSTABS crash])
130 AT_DATA([crosstabs.sps],
151 CROSSTABS TABLES y by z.
153 AT_CHECK([pspp -o - -O format=csv -o pspp.txt crosstabs.sps], [0],
154 [Table: Reading 1 record from INLINE.
155 Variable,Record,Columns,Format
174 ,Valid,,Missing,,Total,
175 ,N,Percent,N,Percent,N,Percent
176 y × z,9,100.0%,0,.0%,9,100.0%
187 # Bug #26739, which caused CROSSTABS to crash or to fail to output
188 # chi-square results.
189 AT_SETUP([CROSSTABS chi-square crash])
190 AT_DATA([crosstabs.sps],
191 [[DATA LIST LIST /x * y *.
203 AT_CHECK([pspp -O format=csv crosstabs.sps], [0],
204 [[Table: Reading free-form data from INLINE.
211 ,Valid,,Missing,,Total,
212 ,N,Percent,N,Percent,N,Percent
213 x × y,4,100.0%,0,.0%,4,100.0%
223 Table: Chi-Square Tests
224 ,Value,df,Asymptotic Sig. (2-tailed)
225 Pearson Chi-Square,2.00,2,.368
226 Likelihood Ratio,2.77,2,.250
227 Linear-by-Linear Association,.27,1,.602
233 AT_SETUP([CROSSTABS crash with SPLIT FILE])
234 AT_DATA([crosstabs.sps],
235 [data list notable / v0 to v2 1-6 (A)
249 SPLIT FILE SEPARATE BY v0.
253 /FORMAT=AVALUE TABLES PIVOT
255 /CELLS=COUNT ROW COLUMN TOTAL.
258 AT_CHECK([pspp -o pspp.csv -o pspp.txt crosstabs.sps])
259 AT_CHECK([cat pspp.csv], [0], [dnl
266 ,Valid,,Missing,,Total,
267 ,N,Percent,N,Percent,N,Percent
268 v1 × v2,6,100.0%,0,.0%,6,100.0%
274 ,,Row %,75.0%,25.0%,100.0%
275 ,,Column %,75.0%,50.0%,66.7%
276 ,,Total %,50.0%,16.7%,66.7%
278 ,,Row %,50.0%,50.0%,100.0%
279 ,,Column %,25.0%,50.0%,33.3%
280 ,,Total %,16.7%,16.7%,33.3%
282 ,,Row %,66.7%,33.3%,100.0%
283 ,,Column %,100.0%,100.0%,100.0%
284 ,,Total %,66.7%,33.3%,100.0%
286 Table: Chi-Square Tests
287 ,Value,df,Asymptotic Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed)
288 Pearson Chi-Square,.38,1,.540,,
289 Likelihood Ratio,.37,1,.545,,
290 Fisher's Exact Test,,,,1.000,.600
291 Continuity Correction,.00,1,1.000,,
292 N of Valid Cases,6,,,,
300 ,Valid,,Missing,,Total,
301 ,N,Percent,N,Percent,N,Percent
302 v1 × v2,4,100.0%,0,.0%,4,100.0%
308 ,,Row %,.0%,100.0%,100.0%
309 ,,Column %,.0%,33.3%,25.0%
310 ,,Total %,.0%,25.0%,25.0%
312 ,,Row %,33.3%,66.7%,100.0%
313 ,,Column %,100.0%,66.7%,75.0%
314 ,,Total %,25.0%,50.0%,75.0%
316 ,,Row %,25.0%,75.0%,100.0%
317 ,,Column %,100.0%,100.0%,100.0%
318 ,,Total %,25.0%,75.0%,100.0%
320 Table: Chi-Square Tests
321 ,Value,df,Asymptotic Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed)
322 Pearson Chi-Square,.44,1,.505,,
323 Likelihood Ratio,.68,1,.410,,
324 Fisher's Exact Test,,,,1.000,.750
325 Continuity Correction,.00,1,1.000,,
326 N of Valid Cases,4,,,,
331 AT_SETUP([3-way CROSSTABS])
332 AT_DATA([crosstabs.sps],
353 CROSSTABS TABLES x BY y BY z/STATISTICS=ALL.
355 AT_CHECK([pspp -o - -O format=csv -o pspp.csv -o pspp.txt crosstabs.sps], [0],
356 [Table: Reading 1 record from INLINE.
357 Variable,Record,Columns,Format
376 ,Valid,,Missing,,Total,
377 ,N,Percent,N,Percent,N,Percent
378 x × y × z,9,100.0%,0,.0%,9,100.0%
395 Table: Chi-Square Tests
396 ,,,Value,df,Asymptotic Sig. (2-tailed)
397 z,1,Pearson Chi-Square,5.00,4,.287
398 ,,Likelihood Ratio,5.00,4,.287
399 ,,Linear-by-Linear Association,.01,1,.938
400 ,,N of Valid Cases,5,,
401 ,2,Pearson Chi-Square,4.00,3,.261
402 ,,Likelihood Ratio,4.50,3,.212
403 ,,Linear-by-Linear Association,1.58,1,.209
404 ,,N of Valid Cases,4,,
406 Table: Symmetric Measures
407 ,,,,Value,Asymp. Std. Error,Approx. T
408 z,1,Nominal by Nominal,Phi,1.00,,
410 ,,,Contingency Coefficient,.71,,
411 ,,Ordinal by Ordinal,Kendall's tau-b,.00,.32,.00
412 ,,,Kendall's tau-c,.00,.32,.00
414 ,,,Spearman Correlation,.00,.22,.00
415 ,,Interval by Interval,Pearson's R,.04,.22,.07
416 ,,N of Valid Cases,,5,,
417 ,2,Nominal by Nominal,Phi,1.00,,
419 ,,,Contingency Coefficient,.71,,
420 ,,Ordinal by Ordinal,Kendall's tau-b,-.71,.20,-1.73
421 ,,,Kendall's tau-c,-.75,.43,-1.73
422 ,,,Gamma,-1.00,.00,-1.73
423 ,,,Spearman Correlation,-.77,.17,-1.73
424 ,,Interval by Interval,Pearson's R,-.73,.18,-1.49
425 ,,N of Valid Cases,,4,,
427 Table: Directional Measures
428 ,,,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
429 z,1,Nominal by Nominal,Lambda,Symmetric,.40,.28,1.12,.264
430 ,,,,x Dependent,.25,.22,1.12,.264
431 ,,,,y Dependent,1.00,.00,1.12,.264
432 ,,,Goodman and Kruskal tau,x Dependent,.25,,,
433 ,,,,y Dependent,1.00,,,
434 ,,,Uncertainty Coefficient,Symmetric,.47,.18,,
435 ,,,,x Dependent,.31,.15,2.02,
436 ,,,,y Dependent,1.00,.00,2.02,
437 ,,Ordinal by Ordinal,Somers' d,Symmetric,.00,,.00,1.000
438 ,,,,x Dependent,.00,.50,.00,1.000
439 ,,,,y Dependent,.00,.20,.00,1.000
440 ,,Nominal by Interval,Eta,x Dependent,.04,,,
441 ,,,,y Dependent,1.00,,,
442 ,2,Nominal by Nominal,Lambda,Symmetric,.50,.25,2.00,.046
443 ,,,,x Dependent,.33,.27,1.15,.248
444 ,,,,y Dependent,1.00,.00,1.15,.248
445 ,,,Goodman and Kruskal tau,x Dependent,.33,,,
446 ,,,,y Dependent,1.00,,,
447 ,,,Uncertainty Coefficient,Symmetric,.58,.17,,
448 ,,,,x Dependent,.41,.17,2.36,
449 ,,,,y Dependent,1.00,.00,2.36,
450 ,,Ordinal by Ordinal,Somers' d,Symmetric,-.67,,-1.73,.083
451 ,,,,x Dependent,-1.00,.00,-1.73,.083
452 ,,,,y Dependent,-.50,.29,-1.73,.083
453 ,,Nominal by Interval,Eta,x Dependent,.73,,,
454 ,,,,y Dependent,1.00,,,
458 AT_SETUP([CROSSTABS rounding weights with COUNT])
459 AT_DATA([crosstabs.sps],
460 [[DATA LIST NOTABLE LIST /x y w.
471 * These should have the same effect (no rounding).
472 CROSSTABS /TABLES x BY y.
473 CROSSTABS /TABLES x BY y /COUNT ASIS.
475 * Round input weights.
476 CROSSTABS /TABLES x BY y /COUNT CASE ROUND.
477 CROSSTABS /TABLES x BY y /COUNT CASE TRUNCATE.
479 * Round cell weights.
480 CROSSTABS /TABLES x BY y /COUNT.
481 CROSSTABS /TABLES x BY y /COUNT TRUNCATE.
484 AT_CHECK([pspp -o pspp.csv -o pspp.txt crosstabs.sps])
485 AT_CHECK([cat pspp.csv], [0],
488 ,Valid,,Missing,,Total,
489 ,N,Percent,N,Percent,N,Percent
490 x × y,9.00,100.0%,.00,.0%,9.00,100.0%
495 x,1.00,Count,2.80,3.20,6.00
496 ,2.00,,1.00,2.00,3.00
497 Total,,,3.80,5.20,9.00
501 ,Valid,,Missing,,Total,
502 ,N,Percent,N,Percent,N,Percent
503 x × y,9.00,100.0%,.00,.0%,9.00,100.0%
508 x,1.00,Count,2.80,3.20,6.00
509 ,2.00,,1.00,2.00,3.00
510 Total,,,3.80,5.20,9.00
514 ,Valid,,Missing,,Total,
515 ,N,Percent,N,Percent,N,Percent
516 x × y,9.00,100.0%,.00,.0%,9.00,100.0%
521 x,1.00,Count,2.00,4.00,6.00
522 ,2.00,,1.00,2.00,3.00
523 Total,,,3.00,6.00,9.00
527 ,Valid,,Missing,,Total,
528 ,N,Percent,N,Percent,N,Percent
529 x × y,7.00,100.0%,.00,.0%,7.00,100.0%
534 x,1.00,Count,2.00,2.00,4.00
535 ,2.00,,1.00,2.00,3.00
536 Total,,,3.00,4.00,7.00
540 ,Valid,,Missing,,Total,
541 ,N,Percent,N,Percent,N,Percent
542 x × y,9.00,100.0%,.00,.0%,9.00,100.0%
547 x,1.00,Count,3.00,3.00,6.00
548 ,2.00,,1.00,2.00,3.00
549 Total,,,4.00,5.00,9.00
553 ,Valid,,Missing,,Total,
554 ,N,Percent,N,Percent,N,Percent
555 x × y,8.00,100.0%,.00,.0%,8.00,100.0%
560 x,1.00,Count,2.00,3.00,5.00
561 ,2.00,,1.00,2.00,3.00
562 Total,,,3.00,5.00,8.00
566 AT_SETUP([CROSSTABS descending sort order])
567 AT_DATA([crosstabs-descending.sps],
568 [[DATA LIST NOTABLE LIST /x * y *.
583 AT_CHECK([pspp -o pspp.csv -o pspp.txt crosstabs-descending.sps])
584 AT_CHECK([cat pspp.csv], [0],
587 ,Valid,,Missing,,Total,
588 ,N,Percent,N,Percent,N,Percent
589 x × y,6,100.0%,0,.0%,6,100.0%
602 AT_SETUP([CROSSTABS crash when all cases missing])
603 AT_DATA([crosstabs.sps], [dnl
604 DATA LIST LIST NOTABLE /X1 X2.
609 MISSING VALUES x2 (1).
611 CROSSTABS /TABLES= X1 by X2.
613 AT_CHECK([pspp -O format=csv crosstabs.sps], [0], [dnl
616 ,Valid,,Missing,,Total,
617 ,N,Percent,N,Percent,N,Percent
618 X1 × X2,0,.0%,1,100.0%,1,100.0%
620 crosstabs.sps:8: warning: CROSSTABS: Crosstabulation X1 × X2 contained no non-missing cases.
626 dnl This example comes from http://www.ats.ucla.edu/stat/spss/whatstat/whatstat.htm#chisq
627 AT_SETUP([CROSSTABS Fisher Exact Test])
629 AT_DATA([fisher-exact.sps], [dnl
633 DATA LIST notable LIST /schtyp (F9.2) female (F9.2) ses (F9.2) .
837 VARIABLE LABEL schtyp 'type of school'.
838 ADD VALUE LABELS female 0 male 1 female.
839 ADD VALUE LABELS ses 1 low 2 middle 3 high.
840 ADD VALUE LABELS schtyp 1 public 2 private.
842 crosstabs /tables = schtyp by female /statistic = chisq.
843 crosstabs /tables = female by ses /statistic = chisq.
846 AT_CHECK([pspp -o pspp.csv -o pspp.txt fisher-exact.sps])
847 AT_CHECK([cat pspp.csv], [0], [Table: Summary
849 ,Valid,,Missing,,Total,
850 ,N,Percent,N,Percent,N,Percent
851 type of school × female,200,100.0%,0,.0%,200,100.0%
853 Table: type of school × female
856 type of school,public,Count,77,91,168
860 Table: Chi-Square Tests
861 ,Value,df,Asymptotic Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed)
862 Pearson Chi-Square,.047,1,.828,,
863 Likelihood Ratio,.047,1,.828,,
864 Fisher's Exact Test,,,,.849,.492
865 Continuity Correction,.001,1,.981,,
866 Linear-by-Linear Association,.047,1,.829,,
867 N of Valid Cases,200,,,,
871 ,Valid,,Missing,,Total,
872 ,N,Percent,N,Percent,N,Percent
873 female × ses,200,100.0%,0,.0%,200,100.0%
878 female,male,Count,15,47,29,91
879 ,female,,32,48,29,109
882 Table: Chi-Square Tests
883 ,Value,df,Asymptotic Sig. (2-tailed)
884 Pearson Chi-Square,4.577,2,.101
885 Likelihood Ratio,4.679,2,.096
886 Linear-by-Linear Association,3.110,1,.078
887 N of Valid Cases,200,,
892 AT_SETUP([CROSSTABS Pearson's R - 1])
893 AT_DATA([pearson.sps], [dnl
896 * From http://www.statisticslectures.com/topics/pearsonr/.
905 CROSSTABS x BY y/STATISTICS=CORR.
907 AT_CHECK([pspp -o pspp.csv -o pspp.txt pearson.sps])
908 AT_CHECK([cat pspp.csv], [0], [dnl
911 ,Valid,,Missing,,Total,
912 ,N,Percent,N,Percent,N,Percent
913 x × y,5,100.0%,0,.0%,5,100.0%
917 ,,,4.000,6.000,10.000,12.000,13.000,
918 x,1.000,Count,1,0,0,0,0,1
924 Table: Symmetric Measures
925 ,,Value,Asymp. Std. Error,Approx. T
926 Ordinal by Ordinal,Spearman Correlation,.975,.022,7.550
927 Interval by Interval,Pearson's R,.968,.017,6.708
928 N of Valid Cases,,5,,
932 AT_SETUP([CROSSTABS Pearson's R - 2])
933 AT_DATA([pearson2.sps], [dnl
936 * Checked with http://www.socscistatistics.com/tests/pearson/Default2.aspx.
950 CROSSTABS x BY y/STATISTICS=CORR.
952 AT_CHECK([pspp -o pspp.csv -o pspp.txt pearson2.sps])
953 AT_CHECK([cat pspp.csv], [0], [dnl
956 ,Valid,,Missing,,Total,
957 ,N,Percent,N,Percent,N,Percent
958 x × y,10,100.0%,0,.0%,10,100.0%
961 ,,,y,,,,,,,,,Total
962 ,,,1.500,4.000,5.000,6.000,6.500,7.000,9.000,10.500,11.000,
963 x,1.000,Count,1,0,0,0,0,0,0,0,0,1
964 ,2.000,,1,0,0,0,0,0,0,0,0,1
965 ,3.000,,0,1,0,0,0,0,0,0,0,1
966 ,4.000,,0,0,0,1,0,0,0,0,0,1
967 ,5.000,,0,0,1,0,0,0,0,0,0,1
968 ,6.000,,0,0,0,0,0,1,0,0,0,1
969 ,7.000,,0,0,0,0,1,0,0,0,0,1
970 ,8.000,,0,0,0,0,0,0,1,0,0,1
971 ,9.000,,0,0,0,0,0,0,0,1,0,1
972 ,10.000,,0,0,0,0,0,0,0,0,1,1
973 Total,,,2,1,1,1,1,1,1,1,1,10
975 Table: Symmetric Measures
976 ,,Value,Asymp. Std. Error,Approx. T
977 Ordinal by Ordinal,Spearman Correlation,.973,.015,11.844
978 Interval by Interval,Pearson's R,.971,.017,11.580
979 N of Valid Cases,,10,,
983 AT_SETUP([CROSSTABS Pearson's R - 3])
984 AT_DATA([pearson3.sps], [dnl
987 * From http://learntech.uwe.ac.uk/da/Default.aspx?pageid=1442.
1000 CROSSTABS x BY y/STATISTICS=CORR.
1002 AT_CHECK([pspp -o pspp.csv -o pspp.txt pearson3.sps])
1003 AT_CHECK([cat pspp.csv], [0], [dnl
1006 ,Valid,,Missing,,Total,
1007 ,N,Percent,N,Percent,N,Percent
1008 x × y,9,100.0%,0,.0%,9,100.0%
1011 ,,,y,,,,,,,,Total
1012 ,,,28.000,58.000,66.000,75.000,85.000,87.000,91.000,122.000,
1013 x,25.000,Count,1,0,0,0,0,0,0,0,1
1014 ,35.000,,0,1,0,0,0,0,0,0,1
1015 ,44.000,,0,0,1,0,0,0,0,0,1
1016 ,50.000,,0,0,0,1,0,0,0,0,1
1017 ,56.000,,0,0,0,0,0,1,1,0,2
1018 ,65.000,,0,0,0,0,1,0,1,0,2
1019 ,87.000,,0,0,0,0,0,0,0,1,1
1020 Total,,,1,1,1,1,1,1,2,1,9
1022 Table: Symmetric Measures
1023 ,,Value,Asymp. Std. Error,Approx. T
1024 Ordinal by Ordinal,Spearman Correlation,.911,.068,5.860
1025 Interval by Interval,Pearson's R,.966,.017,9.915
1026 N of Valid Cases,,9,,
1030 AT_SETUP([CROSSTABS Pearson's R - 4])
1031 AT_DATA([pearson4.sps], [dnl
1034 * From http://psychology.ucdavis.edu/faculty_sites/sommerb/sommerdemo/correlation/hand/pearson_hand.htm.
1050 CROSSTABS x BY y/STATISTICS=CORR.
1052 AT_CHECK([pspp -o pspp.csv -o pspp.txt pearson4.sps])
1053 AT_CHECK([cat pspp.csv], [0], [dnl
1056 ,Valid,,Missing,,Total,
1057 ,N,Percent,N,Percent,N,Percent
1058 x × y,12,100.0%,0,.0%,12,100.0%
1061 ,,,y,,,,,,,,,,,,Total
1062 ,,,2.000,4.000,5.000,7.000,9.000,11.000,12.000,14.000,15.000,17.000,18.000,20.000,
1063 x,2.000,Count,0,0,0,1,0,0,0,0,0,0,0,0,1
1064 ,3.000,,0,0,0,0,0,0,1,0,0,0,0,0,1
1065 ,4.000,,0,0,0,0,1,1,0,0,0,0,0,0,2
1066 ,5.000,,0,0,1,0,0,0,0,0,0,0,0,0,1
1067 ,6.000,,1,1,0,0,0,0,0,0,0,0,0,0,2
1068 ,7.000,,0,0,0,0,0,0,0,1,0,0,0,0,1
1069 ,8.000,,0,0,0,0,0,0,0,0,1,0,0,0,1
1070 ,9.000,,0,0,0,0,0,0,0,0,0,1,0,0,1
1071 ,10.000,,0,0,0,0,0,0,0,0,0,0,1,1,2
1072 Total,,,1,1,1,1,1,1,1,1,1,1,1,1,12
1074 Table: Symmetric Measures
1075 ,,Value,Asymp. Std. Error,Approx. T
1076 Ordinal by Ordinal,Spearman Correlation,.657,.140,2.758
1077 Interval by Interval,Pearson's R,.667,.132,2.830
1078 N of Valid Cases,,12,,
1082 AT_SETUP([CROSSTABS Pearson's R - 5])
1083 AT_DATA([pearson5.sps], [dnl
1086 * From http://www.statisticslectures.com/topics/pearsonr/.
1100 CROSSTABS x BY y/STATISTICS=CORR.
1102 AT_CHECK([pspp -o pspp.csv -o pspp.txt pearson5.sps])
1103 AT_CHECK([cat pspp.csv], [0], [dnl
1106 ,Valid,,Missing,,Total,
1107 ,N,Percent,N,Percent,N,Percent
1108 x × y,10,100.0%,0,.0%,10,100.0%
1111 ,,,y,,,,,,,,,,Total
1112 ,,,15000.00,26000.00,29000.00,32000.00,33000.00,41000.00,45000.00,52000.00,68000.00,80000.00,
1113 x,18.000,Count,1,0,0,0,0,0,0,0,0,0,1
1114 ,24.000,,0,1,0,0,0,0,0,0,0,0,1
1115 ,25.000,,0,0,1,0,0,0,0,0,0,0,1
1116 ,26.000,,0,0,0,1,0,0,0,0,0,0,1
1117 ,33.000,,0,0,0,0,1,0,0,0,0,0,1
1118 ,37.000,,0,0,0,0,0,1,0,0,0,0,1
1119 ,40.000,,0,0,0,0,0,0,1,0,0,0,1
1120 ,45.000,,0,0,0,0,0,0,0,1,0,0,1
1121 ,57.000,,0,0,0,0,0,0,0,0,1,0,1
1122 ,64.000,,0,0,0,0,0,0,0,0,0,1,1
1123 Total,,,1,1,1,1,1,1,1,1,1,1,10
1125 Table: Symmetric Measures
1126 ,,Value,Asymp. Std. Error,Approx. T
1127 Ordinal by Ordinal,Spearman Correlation,1.000,.000,+Infinit
1128 Interval by Interval,Pearson's R,.992,.004,22.638
1129 N of Valid Cases,,10,,
1133 AT_SETUP([CROSSTABS Goodman and Kruskal's lambda - 1])
1134 AT_DATA([lambda.sps], [dnl
1137 * From http://www.csupomona.edu/~jlkorey/POWERMUTT/Topics/contingency_tables.html.
1138 DATA LIST LIST NOTABLE/x y w.
1149 CROSSTABS x BY y/CELLS=NONE/STATISTICS=LAMBDA.
1151 AT_CHECK([pspp -o pspp.csv -o pspp.txt lambda.sps])
1152 AT_CHECK([cat pspp.csv], [0], [dnl
1155 ,Valid,,Missing,,Total,
1156 ,N,Percent,N,Percent,N,Percent
1157 x × y,1296.000,100.0%,.000,.0%,1296.000,100.0%
1159 Table: Directional Measures
1160 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1161 Nominal by Nominal,Lambda,Symmetric,.423,.021,16.875,.000
1162 ,,x Dependent,.497,.024,15.986,.000
1163 ,,y Dependent,.370,.020,16.339,.000
1164 ,Goodman and Kruskal tau,x Dependent,.382,,,
1165 ,,y Dependent,.198,,,
1169 AT_SETUP([CROSSTABS Goodman and Kruskal's lambda - 2])
1170 AT_DATA([lambda.sps], [dnl
1173 * From http://vassarstats.net.
1174 DATA LIST LIST NOTABLE/x y w.
1188 CROSSTABS x BY y/CELLS=NONE/STATISTICS=LAMBDA.
1190 AT_CHECK([pspp -o pspp.csv -o pspp.txt lambda.sps])
1191 AT_CHECK([cat pspp.csv], [0], [dnl
1194 ,Valid,,Missing,,Total,
1195 ,N,Percent,N,Percent,N,Percent
1196 x × y,137.000,100.0%,.000,.0%,137.000,100.0%
1198 Table: Directional Measures
1199 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1200 Nominal by Nominal,Lambda,Symmetric,.259,.081,2.902,.004
1201 ,,x Dependent,.250,.089,2.479,.013
1202 ,,y Dependent,.267,.085,2.766,.006
1203 ,Goodman and Kruskal tau,x Dependent,.129,,,
1204 ,,y Dependent,.123,,,
1208 AT_SETUP([CROSSTABS Goodman and Kruskal's lambda - 3])
1209 AT_DATA([lambda.sps], [dnl
1212 * From Goodman, L.A., Kruskal, W.H. (1954) "Measures of association for
1213 cross classifications". Part I. Journal of the American Statistical
1214 Association, 49, 732-764.
1215 DATA LIST LIST NOTABLE/x y w.
1231 CROSSTABS x BY y/CELLS=NONE/STATISTICS=LAMBDA.
1233 AT_CHECK([pspp -o pspp.csv -o pspp.txt lambda.sps])
1234 AT_CHECK([cat pspp.csv], [0], [dnl
1237 ,Valid,,Missing,,Total,
1238 ,N,Percent,N,Percent,N,Percent
1239 x × y,6800.000,100.0%,.000,.0%,6800.000,100.0%
1241 Table: Directional Measures
1242 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1243 Nominal by Nominal,Lambda,Symmetric,.208,.010,18.793,.000
1244 ,,x Dependent,.224,.013,16.076,.000
1245 ,,y Dependent,.192,.012,14.438,.000
1246 ,Goodman and Kruskal tau,x Dependent,.089,,,
1247 ,,y Dependent,.081,,,
1251 AT_SETUP([CROSSTABS Goodman and Kruskal's lambda - treatment of ties])
1252 AT_DATA([lambda.sps], [dnl
1255 * From Douglas Bonett.
1256 DATA LIST LIST NOTABLE/x y w.
1267 CROSSTABS x BY y/CELLS=NONE/STATISTICS=LAMBDA.
1269 AT_CHECK([pspp -o pspp.csv -o pspp.txt lambda.sps])
1270 AT_CHECK([cat pspp.csv], [0], [dnl
1273 ,Valid,,Missing,,Total,
1274 ,N,Percent,N,Percent,N,Percent
1275 x × y,500.000,100.0%,.000,.0%,500.000,100.0%
1277 Table: Directional Measures
1278 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1279 Nominal by Nominal,Lambda,Symmetric,.031,.013,2.336,.019
1280 ,,x Dependent,.000,.000,NaN,NaN
1281 ,,y Dependent,.033,.014,2.336,.019
1282 ,Goodman and Kruskal tau,x Dependent,.012,,,
1283 ,,y Dependent,.009,,,
1287 AT_SETUP([CROSSTABS Somers' D, Tau-B, Tau-C, Gamma - 1])
1288 AT_DATA([somersd.sps], [dnl
1291 * From http://stats.stackexchange.com/questions/72203/problem-with-calculating-asymptotic-standard-error-for-somers-d.
1292 DATA LIST LIST NOTABLE/x y * w (F10.6).
1310 CROSSTABS x BY y/STATISTICS=D/CELLS=NONE.
1312 AT_CHECK([pspp -o pspp.csv -o pspp.txt somersd.sps])
1313 AT_CHECK([cat pspp.csv], [0], [dnl
1316 ,Valid,,Missing,,Total,
1317 ,N,Percent,N,Percent,N,Percent
1318 x × y,1.000000,100.0%,.000000,.0%,1.000000,100.0%
1320 Table: Directional Measures
1321 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1322 Ordinal by Ordinal,Somers' d,Symmetric,-.084,,-.149,.882
1323 ,,x Dependent,-.045,.300,-.149,.882
1324 ,,y Dependent,-.684,2.378,-.149,.882
1328 AT_SETUP([CROSSTABS Somers' D, Tau-B, Tau-C, Gamma - 2])
1329 AT_DATA([somersd.sps], [dnl
1332 * From http://uregina.ca/~gingrich/gamma.pdf.
1333 DATA LIST LIST NOTABLE/x y w.
1346 CROSSTABS x BY y/STATISTICS=BTAU CTAU GAMMA D/CELLS=NONE.
1348 AT_CHECK([pspp -o pspp.csv -o pspp.txt somersd.sps])
1349 AT_CHECK([cat pspp.csv], [0], [dnl
1352 ,Valid,,Missing,,Total,
1353 ,N,Percent,N,Percent,N,Percent
1354 x × y,687.000,100.0%,.000,.0%,687.000,100.0%
1356 Table: Symmetric Measures
1357 ,,Value,Asymp. Std. Error,Approx. T
1358 Ordinal by Ordinal,Kendall's tau-b,.372,.033,10.669
1359 ,Kendall's tau-c,.310,.029,10.669
1360 ,Gamma,.591,.043,10.669
1361 N of Valid Cases,,687.000,,
1363 Table: Directional Measures
1364 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1365 Ordinal by Ordinal,Somers' d,Symmetric,.371,,10.669,.000
1366 ,,x Dependent,.351,.032,10.669,.000
1367 ,,y Dependent,.394,.035,10.669,.000
1371 AT_SETUP([CROSSTABS Somers' D, Tau-B, Tau-C, Gamma - 3])
1372 AT_DATA([ordinal.sps], [dnl
1375 * From https://www.iup.edu/WorkArea/DownloadAsset.aspx?id=9829, "Case 1".
1376 DATA LIST LIST NOTABLE /x y w.
1383 CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE.
1385 * Same site, case 2.
1386 DATA LIST LIST NOTABLE /x y w.
1393 CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE.
1395 * Same site, case 3.
1396 DATA LIST LIST NOTABLE /x y w.
1403 CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE.
1405 * Same site, case 4.
1406 DATA LIST LIST NOTABLE /x y w.
1414 CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE.
1416 * Same site, case 5.
1417 DATA LIST LIST NOTABLE /x y w.
1425 CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE.
1427 * Same site, case 6.
1428 DATA LIST LIST NOTABLE /x y w.
1440 CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE.
1442 * Same site, case 7.
1443 DATA LIST LIST NOTABLE /x y w.
1455 CROSSTABS x BY y/STATISTICS=LAMBDA D PHI GAMMA/CELLS=NONE.
1457 * Same site, case 8.
1458 DATA LIST LIST NOTABLE /x y w.
1478 CROSSTABS x BY y/STATISTICS=LAMBDA D PHI BTAU/CELLS=NONE.
1480 AT_CHECK([pspp -o pspp.csv -o pspp.txt ordinal.sps])
1481 AT_CHECK([cat pspp.csv], [0], [dnl
1484 ,Valid,,Missing,,Total,
1485 ,N,Percent,N,Percent,N,Percent
1486 x × y,150.000,100.0%,.000,.0%,150.000,100.0%
1488 Table: Symmetric Measures
1489 ,,Value,Asymp. Std. Error,Approx. T
1490 Ordinal by Ordinal,Kendall's tau-b,1.000,.000,24.841
1491 ,Gamma,1.000,.000,24.841
1492 N of Valid Cases,,150.000,,
1494 Table: Directional Measures
1495 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1496 Ordinal by Ordinal,Somers' d,Symmetric,1.000,,24.841,.000
1497 ,,x Dependent,1.000,.000,24.841,.000
1498 ,,y Dependent,1.000,.000,24.841,.000
1502 ,Valid,,Missing,,Total,
1503 ,N,Percent,N,Percent,N,Percent
1504 x × y,150.000,100.0%,.000,.0%,150.000,100.0%
1506 Table: Symmetric Measures
1507 ,,Value,Asymp. Std. Error,Approx. T
1508 Ordinal by Ordinal,Kendall's tau-b,1.000,.000,24.841
1509 ,Gamma,1.000,.000,24.841
1510 N of Valid Cases,,150.000,,
1512 Table: Directional Measures
1513 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1514 Ordinal by Ordinal,Somers' d,Symmetric,1.000,,24.841,.000
1515 ,,x Dependent,1.000,.000,24.841,.000
1516 ,,y Dependent,1.000,.000,24.841,.000
1520 ,Valid,,Missing,,Total,
1521 ,N,Percent,N,Percent,N,Percent
1522 x × y,150.000,100.0%,.000,.0%,150.000,100.0%
1524 Table: Symmetric Measures
1525 ,,Value,Asymp. Std. Error,Approx. T
1526 Ordinal by Ordinal,Kendall's tau-b,-1.000,.000,-24.841
1527 ,Gamma,-1.000,.000,-24.841
1528 N of Valid Cases,,150.000,,
1530 Table: Directional Measures
1531 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1532 Ordinal by Ordinal,Somers' d,Symmetric,-1.000,,-24.841,.000
1533 ,,x Dependent,-1.000,.000,-24.841,.000
1534 ,,y Dependent,-1.000,.000,-24.841,.000
1538 ,Valid,,Missing,,Total,
1539 ,N,Percent,N,Percent,N,Percent
1540 x × y,150.000,100.0%,.000,.0%,150.000,100.0%
1542 Table: Symmetric Measures
1543 ,,Value,Asymp. Std. Error,Approx. T
1544 Ordinal by Ordinal,Kendall's tau-b,.972,.007,24.841
1545 ,Gamma,1.000,.000,24.841
1546 N of Valid Cases,,150.000,,
1548 Table: Directional Measures
1549 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1550 Ordinal by Ordinal,Somers' d,Symmetric,.971,,24.841,.000
1551 ,,x Dependent,.944,.013,24.841,.000
1552 ,,y Dependent,1.000,.000,24.841,.000
1556 ,Valid,,Missing,,Total,
1557 ,N,Percent,N,Percent,N,Percent
1558 x × y,150.000,100.0%,.000,.0%,150.000,100.0%
1560 Table: Symmetric Measures
1561 ,,Value,Asymp. Std. Error,Approx. T
1562 Ordinal by Ordinal,Kendall's tau-b,.119,.059,1.009
1563 ,Gamma,1.000,.000,1.009
1564 N of Valid Cases,,150.000,,
1566 Table: Directional Measures
1567 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1568 Ordinal by Ordinal,Somers' d,Symmetric,.035,,1.009,.313
1569 ,,x Dependent,.805,.032,1.009,.313
1570 ,,y Dependent,.018,.017,1.009,.313
1574 ,Valid,,Missing,,Total,
1575 ,N,Percent,N,Percent,N,Percent
1576 x × y,148.000,100.0%,.000,.0%,148.000,100.0%
1578 Table: Symmetric Measures
1579 ,,Value,Asymp. Std. Error,Approx. T
1580 Ordinal by Ordinal,Kendall's tau-b,-.208,.078,-2.641
1581 ,Gamma,-.381,.130,-2.641
1582 N of Valid Cases,,148.000,,
1584 Table: Directional Measures
1585 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1586 Ordinal by Ordinal,Somers' d,Symmetric,-.206,,-2.641,.008
1587 ,,x Dependent,-.182,.069,-2.641,.008
1588 ,,y Dependent,-.237,.089,-2.641,.008
1592 ,Valid,,Missing,,Total,
1593 ,N,Percent,N,Percent,N,Percent
1594 x × y,148.000,100.0%,.000,.0%,148.000,100.0%
1596 Table: Symmetric Measures
1597 ,,Value,Asymp. Std. Error,Approx. T
1598 Nominal by Nominal,Phi,.731,,
1600 Ordinal by Ordinal,Gamma,-.110,.107,-1.022
1601 N of Valid Cases,,148.000,,
1603 Table: Directional Measures
1604 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1605 Nominal by Nominal,Lambda,Symmetric,.338,.059,4.743,.000
1606 ,,x Dependent,.640,.085,4.875,.000
1607 ,,y Dependent,.174,.050,3.248,.001
1608 ,Goodman and Kruskal tau,x Dependent,.534,,,
1609 ,,y Dependent,.167,,,
1610 Ordinal by Ordinal,Somers' d,Symmetric,-.074,,-1.022,.307
1611 ,,x Dependent,-.060,.059,-1.022,.307
1612 ,,y Dependent,-.096,.094,-1.022,.307
1616 ,Valid,,Missing,,Total,
1617 ,N,Percent,N,Percent,N,Percent
1618 x × y,212.000,100.0%,.000,.0%,212.000,100.0%
1620 Table: Symmetric Measures
1621 ,,Value,Asymp. Std. Error,Approx. T
1622 Nominal by Nominal,Phi,.432,,
1624 Ordinal by Ordinal,Kendall's tau-b,.209,.062,3.338
1625 N of Valid Cases,,212.000,,
1627 Table: Directional Measures
1628 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1629 Nominal by Nominal,Lambda,Symmetric,.102,.067,1.473,.141
1630 ,,x Dependent,.027,.087,.302,.763
1631 ,,y Dependent,.165,.065,2.349,.019
1632 ,Goodman and Kruskal tau,x Dependent,.051,,,
1633 ,,y Dependent,.068,,,
1634 Ordinal by Ordinal,Somers' d,Symmetric,.209,,3.338,.001
1635 ,,x Dependent,.202,.060,3.338,.001
1636 ,,y Dependent,.217,.064,3.338,.001
1640 AT_SETUP([CROSSTABS Cohens Kappa])
1642 dnl Example from Wood J. M.
1643 dnl "Understanding and Computing Cohen's Kappa: A Tutorial"
1644 dnl WebPsychEmpiricist. Oct 3 2007
1645 AT_DATA([kappa.sps], [dnl
1648 data list notable list /p1 * p2 * w *.
1657 crosstabs /table = p1 by p2
1662 AT_CHECK([pspp -o pspp.csv -o pspp.txt kappa.sps])
1663 AT_CHECK([cat pspp.csv], [0], [dnl
1666 ,Valid,,Missing,,Total,
1667 ,N,Percent,N,Percent,N,Percent
1668 p1 × p2,20.000,100.0%,.000,.0%,20.000,100.0%
1673 p1,.000,Count,18.000,1.000,19.000
1674 ,1.000,,1.000,.000,1.000
1675 Total,,,19.000,1.000,20.000
1677 Table: Symmetric Measures
1678 ,,Value,Asymp. Std. Error,Approx. T
1679 Measure of Agreement,Kappa,-.053,.037,-.235
1680 N of Valid Cases,,20.000,,
1686 AT_SETUP([CROSSTABS many statistics])
1687 AT_DATA([crosstabs.sps], [dnl
1690 * From http://www4.stat.ncsu.edu/~dzhang2/st744/table3.9.lst.txt.
1691 DATA LIST LIST NOTABLE/x y w.
1700 CROSSTABS x BY y/STATISTICS=CHISQ PHI CC LAMBDA UC BTAU CTAU GAMMA D CORR/CELLS=NONE.
1702 AT_CHECK([pspp -o pspp.csv -o pspp.txt crosstabs.sps])
1703 AT_CHECK([cat pspp.csv], [0], [dnl
1706 ,Valid,,Missing,,Total,
1707 ,N,Percent,N,Percent,N,Percent
1708 x × y,66.0000,100.0%,.0000,.0%,66.0000,100.0%
1710 Table: Chi-Square Tests
1711 ,Value,df,Asymptotic Sig. (2-tailed)
1712 Pearson Chi-Square,6.9562,2.0000,.031
1713 Likelihood Ratio,6.6901,2.0000,.035
1714 Linear-by-Linear Association,5.8450,1.0000,.016
1715 N of Valid Cases,66.0000,,
1717 Table: Symmetric Measures
1718 ,,Value,Asymp. Std. Error,Approx. T
1719 Nominal by Nominal,Phi,.3246,,
1721 ,Contingency Coefficient,.3088,,
1722 Ordinal by Ordinal,Kendall's tau-b,.2752,.0856,1.9920
1723 ,Kendall's tau-c,.1497,.0751,1.9920
1724 ,Gamma,.8717,.1250,1.9920
1725 ,Spearman Correlation,.2908,.0906,2.4311
1726 Interval by Interval,Pearson's R,.2999,.0973,2.5147
1727 N of Valid Cases,,66.0000,,
1729 Table: Directional Measures
1730 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1731 Nominal by Nominal,Lambda,Symmetric,.0455,.1629,.2723,.785
1732 ,,x Dependent,.0000,.0000,NaN,NaN
1733 ,,y Dependent,.0500,.1791,.2723,.785
1734 ,Goodman and Kruskal tau,x Dependent,.1054,,,
1735 ,,y Dependent,.0434,,,
1736 ,Uncertainty Coefficient,Symmetric,.0780,.0474,,
1737 ,,x Dependent,.2217,.1062,1.5373,
1738 ,,y Dependent,.0473,.0306,1.5373,
1739 Ordinal by Ordinal,Somers' d,Symmetric,.1960,,1.9920,.046
1740 ,,x Dependent,.1152,.0572,1.9920,.046
1741 ,,y Dependent,.6573,.1417,1.9920,.046
1745 AT_SETUP([CROSSTABS uncertainy coefficient])
1746 AT_DATA([uc.sps], [dnl
1747 * From http://groups.chass.utoronto.ca/pol242/5bMeasuringAssociation.htm.
1750 DATA LIST LIST NOTABLE/x y w.
1760 CROSSTABS x BY y/STATISTICS=LAMBDA UC/CELLS=NONE.
1762 AT_CHECK([pspp -o pspp.csv -o pspp.txt uc.sps])
1763 AT_CHECK([cat pspp.csv], [0], [dnl
1766 ,Valid,,Missing,,Total,
1767 ,N,Percent,N,Percent,N,Percent
1768 x × y,987.000,100.0%,.000,.0%,987.000,100.0%
1770 Table: Directional Measures
1771 ,,,Value,Asymp. Std. Error,Approx. T,Approx. Sig.
1772 Nominal by Nominal,Lambda,Symmetric,.000,.000,NaN,NaN
1773 ,,x Dependent,.000,.000,NaN,NaN
1774 ,,y Dependent,.000,.000,NaN,NaN
1775 ,Goodman and Kruskal tau,x Dependent,.076,,,
1776 ,,y Dependent,.108,,,
1777 ,Uncertainty Coefficient,Symmetric,.105,.012,,
1778 ,,x Dependent,.073,.009,7.890,
1779 ,,y Dependent,.184,.019,7.890,
1783 AT_SETUP([CROSSTABS estimated risk])
1784 dnl Example data and expected output from
1785 dnl http://www.psychology.nottingham.ac.uk/staff/ddc/c8cxpa/further/Project_resources/SPSSCrosstabW.pdf
1786 AT_DATA([risk.sps], [dnl
1787 DATA LIST LIST /factor disease count (F8.0).
1789 VALUE LABELS /factor 0 'Placebo' 1 'Aspirin'
1790 /disease 1 'No' 0 'Yes'.
1797 CROSSTABS factor BY disease/STATISTICS=RISK CHISQ.
1799 AT_CHECK([pspp -o pspp.csv -o pspp.txt risk.sps])
1800 AT_CHECK([cat pspp.csv], [0], [dnl
1801 Table: Reading free-form data from INLINE.
1809 ,Valid,,Missing,,Total,
1810 ,N,Percent,N,Percent,N,Percent
1811 factor × disease,250,100.0%,0,.0%,250,100.0%
1813 Table: factor × disease
1816 factor,Placebo,Count,20,80,100
1817 ,Aspirin,,15,135,150
1820 Table: Chi-Square Tests
1821 ,Value,df,Asymptotic Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed)
1822 Pearson Chi-Square,4.98,1,.026,,
1823 Likelihood Ratio,4.88,1,.027,,
1824 Fisher's Exact Test,,,,.039,.021
1825 Continuity Correction,4.19,1,.041,,
1826 Linear-by-Linear Association,4.96,1,.026,,
1827 N of Valid Cases,250,,,,
1829 Table: Risk Estimate
1830 ,Value,95% Confidence Interval,
1832 Odds Ratio for factor (Placebo / Aspirin),2.25,2.25,2.25
1833 For cohort disease = Yes,1.08,1.08,1.08
1834 For cohort disease = No,.99,.99,.99
1835 N of Valid Cases,250.00,,
1839 AT_SETUP([CROSSTABS barchart])
1840 AT_DATA([bc.sps], [dnl
1843 DATA LIST LIST NOTABLE /x (a20) y (f8) z (f8) w (f8) .
1867 AT_CHECK([pspp -O format=txt -o xxx bc.sps], [0], [ignore])
1869 AT_CHECK([test -e xxx-1.png], [0], [ignore])
1870 AT_CHECK([test -e xxx-2.png], [0], [ignore])
1872 AT_CHECK([diff xxx-1.png xxx-2.png], [0], [ignore])