FACTOR: Improve error messages and coding style.
[pspp] / tests / language / stats / crosstabs.at
index 21154183fceb1c055ad0f0cc7400c0895057efbd..a26379e88af7337aa8cafbca9868414118fcd121 100644 (file)
@@ -16,6 +16,67 @@ dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
 dnl
 AT_BANNER([CROSSTABS procedure])
 
+dnl Based on bug #60982.
+AT_SETUP([CROSSTABS residuals])
+AT_DATA([crosstabs.sps],
+  [DATASET CLOSE ALL.
+DATA LIST LIST NOTABLE/ r c n.
+BEGIN DATA
+1 1 26
+1 2 31
+2 1 12
+2 2 32
+3 1 27
+3 2 18
+4 1 8
+4 2 7
+END DATA.
+WEIGHT by n.
+CROSSTABS r by c /STATISTICS=CHISQ
+/CELLS=COUNT EXPECTED RESID SRESID ASRESID.
+])
+AT_CHECK([pspp -O format=csv crosstabs.sps], [0],
+  [Table: Summary
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+r × c,161.00,100.0%,.00,.0%,161.00,100.0%
+
+Table: r × c
+,,,c,,Total
+,,,1.00,2.00,
+r,1.00,Count,26.00,31.00,57.00
+,,Expected,25.84,31.16,.35
+,,Residual,.16,-.16,
+,,Std. Residual,.03,-.03,
+,,Adjusted Residual,.05,-.05,
+,2.00,Count,12.00,32.00,44.00
+,,Expected,19.95,24.05,.27
+,,Residual,-7.95,7.95,
+,,Std. Residual,-1.78,1.62,
+,,Adjusted Residual,-2.82,2.82,
+,3.00,Count,27.00,18.00,45.00
+,,Expected,20.40,24.60,.28
+,,Residual,6.60,-6.60,
+,,Std. Residual,1.46,-1.33,
+,,Adjusted Residual,2.33,-2.33,
+,4.00,Count,8.00,7.00,15.00
+,,Expected,6.80,8.20,.09
+,,Residual,1.20,-1.20,
+,,Std. Residual,.46,-.42,
+,,Adjusted Residual,.65,-.65,
+Total,,Count,73.00,88.00,161.00
+,,Expected,.45,.55,1.00
+
+Table: Chi-Square Tests
+,Value,df,Asymptotic Sig. (2-tailed)
+Pearson Chi-Square,10.09,3.00,.018
+Likelihood Ratio,10.35,3.00,.016
+Linear-by-Linear Association,1.96,1.00,.162
+N of Valid Cases,161.00,,
+])
+AT_CLEANUP
+
 AT_SETUP([CROSSTABS integer mode crash])
 AT_DATA([crosstabs.sps],
   [DATA LIST LIST /A * B * X * Y * .
@@ -44,13 +105,13 @@ Table: X × Y
 ,,,Y,,,,,,,Total
 ,,,1.00,2.00,3.00,4.00,5.00,6.00,7.00,
 X,1.00,Count,0,0,0,0,0,0,0,0
-,2.00,,0,0,0,0,0,0,0,0
-,3.00,,0,0,0,0,0,0,0,0
-,4.00,,0,0,0,0,1,0,0,1
-,5.00,,0,0,0,0,0,0,0,0
-,6.00,,0,0,0,0,0,0,0,0
-,7.00,,0,0,0,0,0,0,0,0
-Total,,,0,0,0,0,1,0,0,1
+,2.00,Count,0,0,0,0,0,0,0,0
+,3.00,Count,0,0,0,0,0,0,0,0
+,4.00,Count,0,0,0,0,1,0,0,1
+,5.00,Count,0,0,0,0,0,0,0,0
+,6.00,Count,0,0,0,0,0,0,0,0
+,7.00,Count,0,0,0,0,0,0,0,0
+Total,,Count,0,0,0,0,1,0,0,1
 ]])
 AT_CLEANUP
 
@@ -79,8 +140,12 @@ Table: Summary
 x × y,0,.0%,1,100.0%,1,100.0%
 
 Table: x × y
-,,
-,,
+,,,y,,,,,,,Total
+,,,1.00,2.00,3.00,4.00,5.00,6.00,7.00,
+x,1.00,Count,,,,,,,,
+,2.00,Count,,,,,,,,
+,3.00,Count,,,,,,,,
+Total,,Count,,,,,,,,
 ]])
 AT_CLEANUP
 
@@ -120,9 +185,9 @@ Table: x × y
 ,,,y,,,,Total
 ,,,one unity,three lots,two duality,zero none,
 x,1.00,Count,1,0,0,1,2
-,2.00,,0,0,1,0,1
-,3.00,,0,1,0,0,1
-Total,,,1,1,1,1,4
+,2.00,Count,0,0,1,0,1
+,3.00,Count,0,1,0,0,1
+Total,,Count,1,1,1,1,4
 ]])
 AT_CLEANUP
 
@@ -153,9 +218,9 @@ CROSSTABS TABLES  y by z.
 AT_CHECK([pspp -o - -O format=csv -o pspp.txt 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
+x,1,1-2,F2.0
+y,1,3-3,F1.0
+z,1,4-4,F1.0
 
 Table: Data List
 x,y,z
@@ -179,8 +244,8 @@ Table: y × z
 ,,,z,,Total
 ,,,1,2,
 y,1,Count,4,3,7
-,2,,1,1,2
-Total,,,5,4,9
+,2,Count,1,1,2
+Total,,Count,5,4,9
 ])
 AT_CLEANUP
 
@@ -216,9 +281,9 @@ Table: x × y
 ,,,y,,Total
 ,,,1.00,2.00,
 x,2.00,Count,0,1,1
-,3.00,,1,0,1
-,4.00,,1,1,2
-Total,,,2,2,4
+,3.00,Count,1,0,1
+,4.00,Count,1,1,2
+Total,,Count,2,2,4
 
 Table: Chi-Square Tests
 ,Value,df,Asymptotic Sig. (2-tailed)
@@ -250,7 +315,7 @@ SPLIT FILE SEPARATE BY v0.
 
 CROSSTABS
     /TABLES= v1 BY v2
-    /FORMAT=AVALUE TABLES PIVOT
+    /FORMAT=AVALUE TABLES
     /STATISTICS=CHISQ
     /CELLS=COUNT ROW COLUMN TOTAL.
 ])
@@ -355,9 +420,9 @@ CROSSTABS TABLES  x BY y BY z/STATISTICS=ALL.
 AT_CHECK([pspp -o - -O format=csv -o pspp.csv -o pspp.txt 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
+x,1,1-2,F2.0
+y,1,3-3,F1.0
+z,1,4-4,F1.0
 
 Table: Data List
 x,y,z
@@ -381,16 +446,16 @@ Table: x × y × z
 ,,,,,y,,Total
 ,,,,,1,2,
 z,1,x,1,Count,1,0,1
-,,,3,,0,0,1
-,,,5,,1,0,1
-,,,7,,0,0,1
-,,,8,,0,1,1
-,,Total,,,4,1,5
-,2,x,2,,0,0,1
-,,,4,,0,1,1
-,,,6,,0,0,1
-,,,9,,1,0,1
-,,Total,,,3,1,4
+,,,3,Count,0,0,1
+,,,5,Count,1,0,1
+,,,7,Count,0,0,1
+,,,8,Count,0,1,1
+,,Total,,Count,4,1,5
+,2,x,2,Count,0,0,1
+,,,4,Count,0,1,1
+,,,6,Count,0,0,1
+,,,9,Count,1,0,1
+,,Total,,Count,3,1,4
 
 Table: Chi-Square Tests
 ,,,Value,df,Asymptotic Sig. (2-tailed)
@@ -493,8 +558,8 @@ Table: x × y
 ,,,y,,Total
 ,,,1.00,2.00,
 x,1.00,Count,2.80,3.20,6.00
-,2.00,,1.00,2.00,3.00
-Total,,,3.80,5.20,9.00
+,2.00,Count,1.00,2.00,3.00
+Total,,Count,3.80,5.20,9.00
 
 Table: Summary
 ,Cases,,,,,
@@ -506,8 +571,8 @@ Table: x × y
 ,,,y,,Total
 ,,,1.00,2.00,
 x,1.00,Count,2.80,3.20,6.00
-,2.00,,1.00,2.00,3.00
-Total,,,3.80,5.20,9.00
+,2.00,Count,1.00,2.00,3.00
+Total,,Count,3.80,5.20,9.00
 
 Table: Summary
 ,Cases,,,,,
@@ -519,8 +584,8 @@ Table: x × y
 ,,,y,,Total
 ,,,1.00,2.00,
 x,1.00,Count,2.00,4.00,6.00
-,2.00,,1.00,2.00,3.00
-Total,,,3.00,6.00,9.00
+,2.00,Count,1.00,2.00,3.00
+Total,,Count,3.00,6.00,9.00
 
 Table: Summary
 ,Cases,,,,,
@@ -532,8 +597,8 @@ Table: x × y
 ,,,y,,Total
 ,,,1.00,2.00,
 x,1.00,Count,2.00,2.00,4.00
-,2.00,,1.00,2.00,3.00
-Total,,,3.00,4.00,7.00
+,2.00,Count,1.00,2.00,3.00
+Total,,Count,3.00,4.00,7.00
 
 Table: Summary
 ,Cases,,,,,
@@ -545,8 +610,8 @@ Table: x × y
 ,,,y,,Total
 ,,,1.00,2.00,
 x,1.00,Count,3.00,3.00,6.00
-,2.00,,1.00,2.00,3.00
-Total,,,4.00,5.00,9.00
+,2.00,Count,1.00,2.00,3.00
+Total,,Count,4.00,5.00,9.00
 
 Table: Summary
 ,Cases,,,,,
@@ -558,8 +623,8 @@ Table: x × y
 ,,,y,,Total
 ,,,1.00,2.00,
 x,1.00,Count,2.00,3.00,5.00
-,2.00,,1.00,2.00,3.00
-Total,,,3.00,5.00,8.00
+,2.00,Count,1.00,2.00,3.00
+Total,,Count,3.00,5.00,8.00
 ])
 AT_CLEANUP
 
@@ -592,9 +657,9 @@ Table: x × y
 ,,,y,,Total
 ,,,2.00,1.00,
 x,4.00,Count,0,1,1
-,3.00,,2,1,3
-,2.00,,2,0,2
-Total,,,4,2,6
+,3.00,Count,2,1,3
+,2.00,Count,2,0,2
+Total,,Count,4,2,6
 ])
 AT_CLEANUP
 
@@ -617,7 +682,9 @@ Table: Summary
 ,N,Percent,N,Percent,N,Percent
 X1 × X2,0,.0%,1,100.0%,1,100.0%
 
-crosstabs.sps:8: warning: CROSSTABS: Crosstabulation X1 × X2 contained no non-missing cases.
+"crosstabs.sps:8.20-8.27: warning: CROSSTABS: Crosstabulation X1 × X2 contained no non-missing cases.
+    8 | CROSSTABS /TABLES= X1 by X2.
+      |                    ^~~~~~~~"
 ])
 AT_CLEANUP
 
@@ -854,8 +921,8 @@ Table: type of school × female
 ,,,female,,Total
 ,,,male,female,
 type of school,public,Count,77,91,168
-,private,,14,18,32
-Total,,,91,109,200
+,private,Count,14,18,32
+Total,,Count,91,109,200
 
 Table: Chi-Square Tests
 ,Value,df,Asymptotic Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed)
@@ -876,8 +943,8 @@ Table: female × ses
 ,,,ses,,,Total
 ,,,low,middle,high,
 female,male,Count,15,47,29,91
-,female,,32,48,29,109
-Total,,,47,95,58,200
+,female,Count,32,48,29,109
+Total,,Count,47,95,58,200
 
 Table: Chi-Square Tests
 ,Value,df,Asymptotic Sig. (2-tailed)
@@ -916,10 +983,10 @@ Table: x × y
 ,,,y,,,,,Total
 ,,,4.000,6.000,10.000,12.000,13.000,
 x,1.000,Count,1,0,0,0,0,1
-,3.000,,0,1,0,0,0,1
-,5.000,,0,0,1,1,0,2
-,6.000,,0,0,0,0,1,1
-Total,,,1,1,1,1,1,5
+,3.000,Count,0,1,0,0,0,1
+,5.000,Count,0,0,1,1,0,2
+,6.000,Count,0,0,0,0,1,1
+Total,,Count,1,1,1,1,1,5
 
 Table: Symmetric Measures
 ,,Value,Asymp. Std. Error,Approx. T
@@ -961,16 +1028,16 @@ Table: x × y
 ,,,y,,,,,,,,,Total
 ,,,1.500,4.000,5.000,6.000,6.500,7.000,9.000,10.500,11.000,
 x,1.000,Count,1,0,0,0,0,0,0,0,0,1
-,2.000,,1,0,0,0,0,0,0,0,0,1
-,3.000,,0,1,0,0,0,0,0,0,0,1
-,4.000,,0,0,0,1,0,0,0,0,0,1
-,5.000,,0,0,1,0,0,0,0,0,0,1
-,6.000,,0,0,0,0,0,1,0,0,0,1
-,7.000,,0,0,0,0,1,0,0,0,0,1
-,8.000,,0,0,0,0,0,0,1,0,0,1
-,9.000,,0,0,0,0,0,0,0,1,0,1
-,10.000,,0,0,0,0,0,0,0,0,1,1
-Total,,,2,1,1,1,1,1,1,1,1,10
+,2.000,Count,1,0,0,0,0,0,0,0,0,1
+,3.000,Count,0,1,0,0,0,0,0,0,0,1
+,4.000,Count,0,0,0,1,0,0,0,0,0,1
+,5.000,Count,0,0,1,0,0,0,0,0,0,1
+,6.000,Count,0,0,0,0,0,1,0,0,0,1
+,7.000,Count,0,0,0,0,1,0,0,0,0,1
+,8.000,Count,0,0,0,0,0,0,1,0,0,1
+,9.000,Count,0,0,0,0,0,0,0,1,0,1
+,10.000,Count,0,0,0,0,0,0,0,0,1,1
+Total,,Count,2,1,1,1,1,1,1,1,1,10
 
 Table: Symmetric Measures
 ,,Value,Asymp. Std. Error,Approx. T
@@ -1011,13 +1078,13 @@ Table: x × y
 ,,,y,,,,,,,,Total
 ,,,28.000,58.000,66.000,75.000,85.000,87.000,91.000,122.000,
 x,25.000,Count,1,0,0,0,0,0,0,0,1
-,35.000,,0,1,0,0,0,0,0,0,1
-,44.000,,0,0,1,0,0,0,0,0,1
-,50.000,,0,0,0,1,0,0,0,0,1
-,56.000,,0,0,0,0,0,1,1,0,2
-,65.000,,0,0,0,0,1,0,1,0,2
-,87.000,,0,0,0,0,0,0,0,1,1
-Total,,,1,1,1,1,1,1,2,1,9
+,35.000,Count,0,1,0,0,0,0,0,0,1
+,44.000,Count,0,0,1,0,0,0,0,0,1
+,50.000,Count,0,0,0,1,0,0,0,0,1
+,56.000,Count,0,0,0,0,0,1,1,0,2
+,65.000,Count,0,0,0,0,1,0,1,0,2
+,87.000,Count,0,0,0,0,0,0,0,1,1
+Total,,Count,1,1,1,1,1,1,2,1,9
 
 Table: Symmetric Measures
 ,,Value,Asymp. Std. Error,Approx. T
@@ -1061,15 +1128,15 @@ Table: x × y
 ,,,y,,,,,,,,,,,,Total
 ,,,2.000,4.000,5.000,7.000,9.000,11.000,12.000,14.000,15.000,17.000,18.000,20.000,
 x,2.000,Count,0,0,0,1,0,0,0,0,0,0,0,0,1
-,3.000,,0,0,0,0,0,0,1,0,0,0,0,0,1
-,4.000,,0,0,0,0,1,1,0,0,0,0,0,0,2
-,5.000,,0,0,1,0,0,0,0,0,0,0,0,0,1
-,6.000,,1,1,0,0,0,0,0,0,0,0,0,0,2
-,7.000,,0,0,0,0,0,0,0,1,0,0,0,0,1
-,8.000,,0,0,0,0,0,0,0,0,1,0,0,0,1
-,9.000,,0,0,0,0,0,0,0,0,0,1,0,0,1
-,10.000,,0,0,0,0,0,0,0,0,0,0,1,1,2
-Total,,,1,1,1,1,1,1,1,1,1,1,1,1,12
+,3.000,Count,0,0,0,0,0,0,1,0,0,0,0,0,1
+,4.000,Count,0,0,0,0,1,1,0,0,0,0,0,0,2
+,5.000,Count,0,0,1,0,0,0,0,0,0,0,0,0,1
+,6.000,Count,1,1,0,0,0,0,0,0,0,0,0,0,2
+,7.000,Count,0,0,0,0,0,0,0,1,0,0,0,0,1
+,8.000,Count,0,0,0,0,0,0,0,0,1,0,0,0,1
+,9.000,Count,0,0,0,0,0,0,0,0,0,1,0,0,1
+,10.000,Count,0,0,0,0,0,0,0,0,0,0,1,1,2
+Total,,Count,1,1,1,1,1,1,1,1,1,1,1,1,12
 
 Table: Symmetric Measures
 ,,Value,Asymp. Std. Error,Approx. T
@@ -1111,16 +1178,16 @@ Table: x × y
 ,,,y,,,,,,,,,,Total
 ,,,15000.00,26000.00,29000.00,32000.00,33000.00,41000.00,45000.00,52000.00,68000.00,80000.00,
 x,18.000,Count,1,0,0,0,0,0,0,0,0,0,1
-,24.000,,0,1,0,0,0,0,0,0,0,0,1
-,25.000,,0,0,1,0,0,0,0,0,0,0,1
-,26.000,,0,0,0,1,0,0,0,0,0,0,1
-,33.000,,0,0,0,0,1,0,0,0,0,0,1
-,37.000,,0,0,0,0,0,1,0,0,0,0,1
-,40.000,,0,0,0,0,0,0,1,0,0,0,1
-,45.000,,0,0,0,0,0,0,0,1,0,0,1
-,57.000,,0,0,0,0,0,0,0,0,1,0,1
-,64.000,,0,0,0,0,0,0,0,0,0,1,1
-Total,,,1,1,1,1,1,1,1,1,1,1,10
+,24.000,Count,0,1,0,0,0,0,0,0,0,0,1
+,25.000,Count,0,0,1,0,0,0,0,0,0,0,1
+,26.000,Count,0,0,0,1,0,0,0,0,0,0,1
+,33.000,Count,0,0,0,0,1,0,0,0,0,0,1
+,37.000,Count,0,0,0,0,0,1,0,0,0,0,1
+,40.000,Count,0,0,0,0,0,0,1,0,0,0,1
+,45.000,Count,0,0,0,0,0,0,0,1,0,0,1
+,57.000,Count,0,0,0,0,0,0,0,0,1,0,1
+,64.000,Count,0,0,0,0,0,0,0,0,0,1,1
+Total,,Count,1,1,1,1,1,1,1,1,1,1,10
 
 Table: Symmetric Measures
 ,,Value,Asymp. Std. Error,Approx. T
@@ -1655,7 +1722,7 @@ end data.
 weight by w.
 
 crosstabs /table = p1 by p2
-       statistics = kappa
+       /statistics = kappa
        .
 ])
 
@@ -1671,8 +1738,8 @@ Table: p1 × p2
 ,,,p2,,Total
 ,,,.000,1.000,
 p1,.000,Count,18.000,1.000,19.000
-,1.000,,1.000,.000,1.000
-Total,,,19.000,1.000,20.000
+,1.000,Count,1.000,.000,1.000
+Total,,Count,19.000,1.000,20.000
 
 Table: Symmetric Measures
 ,,Value,Asymp. Std. Error,Approx. T
@@ -1814,8 +1881,8 @@ Table: factor × disease
 ,,,disease,,Total
 ,,,Yes,No,
 factor,Placebo,Count,20,80,100
-,Aspirin,,15,135,150
-Total,,,35,215,250
+,Aspirin,Count,15,135,150
+Total,,Count,35,215,250
 
 Table: Chi-Square Tests
 ,Value,df,Asymptotic Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed)
@@ -1872,3 +1939,93 @@ AT_CHECK([test -e xxx-2.png], [0], [ignore])
 AT_CHECK([diff xxx-1.png xxx-2.png], [0], [ignore])
 
 AT_CLEANUP
+
+AT_SETUP([CROSSTABS syntax errors])
+AT_DATA([crosstabs.sps], [dnl
+DATA LIST LIST NOTABLE/x y v1 to v100.
+CROSSTABS TABLES=x BY y/VARIABLES **.
+CROSSTABS VARIABLES=**.
+CROSSTABS VARIABLES=x **.
+CROSSTABS VARIABLES=x (**).
+CROSSTABS VARIABLES=x (1,**).
+CROSSTABS VARIABLES=x (1,5**).
+CROSSTABS MISSING=**.
+CROSSTABS COUNT=**.
+CROSSTABS FORMAT=**.
+CROSSTABS CELLS=**.
+CROSSTABS STATISTICS=**.
+CROSSTABS **.
+CROSSTABS
+       v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100
+    BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100
+    BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100
+    BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100
+    BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100
+    BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100.
+CROSSTABS BARCHART.
+CROSSTABS x BY y/MISSING=REPORT.
+])
+AT_CHECK([pspp -O format=csv crosstabs.sps], [1], [dnl
+"crosstabs.sps:2.25-2.33: error: CROSSTABS: VARIABLES must be specified before TABLES.
+    2 | CROSSTABS TABLES=x BY y/VARIABLES **.
+      |                         ^~~~~~~~~"
+
+"crosstabs.sps:3.21-3.22: error: CROSSTABS: Syntax error expecting variable name.
+    3 | CROSSTABS VARIABLES=**.
+      |                     ^~"
+
+"crosstabs.sps:4.23-4.24: error: CROSSTABS: Syntax error expecting `('.
+    4 | CROSSTABS VARIABLES=x **.
+      |                       ^~"
+
+"crosstabs.sps:5.24-5.25: error: CROSSTABS: Syntax error expecting integer.
+    5 | CROSSTABS VARIABLES=x (**).
+      |                        ^~"
+
+"crosstabs.sps:6.26-6.27: error: CROSSTABS: Syntax error expecting positive integer.
+    6 | CROSSTABS VARIABLES=x (1,**).
+      |                          ^~"
+
+"crosstabs.sps:7.27-7.28: error: CROSSTABS: Syntax error expecting `)'.
+    7 | CROSSTABS VARIABLES=x (1,5**).
+      |                           ^~"
+
+"crosstabs.sps:8.19-8.20: error: CROSSTABS: Syntax error expecting TABLE, INCLUDE, or REPORT.
+    8 | CROSSTABS MISSING=**.
+      |                   ^~"
+
+"crosstabs.sps:9.17-9.18: error: CROSSTABS: Syntax error expecting ASIS, CASE, CELL, ROUND, or TRUNCATE.
+    9 | CROSSTABS COUNT=**.
+      |                 ^~"
+
+"crosstabs.sps:10.18-10.19: error: CROSSTABS: Syntax error expecting AVALUE, DVALUE, TABLES, or NOTABLES.
+   10 | CROSSTABS FORMAT=**.
+      |                  ^~"
+
+"crosstabs.sps:11.17-11.18: error: CROSSTABS: Syntax error expecting COUNT, EXPECTED, ROW, COLUMN, TOTAL, RESIDUAL, SRESIDUAL, or ASRESIDUAL.
+   11 | CROSSTABS CELLS=**.
+      |                 ^~"
+
+"crosstabs.sps:12.22-12.23: error: CROSSTABS: Syntax error expecting one of the following: CHISQ, PHI, CC, LAMBDA, UC, BTAU, CTAU, RISK, GAMMA, D, KAPPA, ETA, CORR.
+   12 | CROSSTABS STATISTICS=**.
+      |                      ^~"
+
+"crosstabs.sps:13.11-13.12: error: CROSSTABS: Syntax error expecting subcommand name or variable name.
+   13 | CROSSTABS **.
+      |           ^~"
+
+"crosstabs.sps:15.8-16.59: error: CROSSTABS: Too many cross-tabulation variables or dimensions.
+   15 |        v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100
+      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   16 |     BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100
+      | -----------------------------------------------------------"
+
+crosstabs.sps:21: error: CROSSTABS: At least one crosstabulation must be requested (using the TABLES subcommand).
+
+"crosstabs.sps:22.26-22.31: warning: CROSSTABS: Missing mode REPORT not allowed in general mode.  Assuming MISSING=TABLE.
+   22 | CROSSTABS x BY y/MISSING=REPORT.
+      |                          ^~~~~~"
+
+error: CROSSTABS: At end of input: Syntax error expecting `BEGIN DATA'.
+])
+AT_CLEANUP
\ No newline at end of file