3 dnl Features not yet tested:
4 dnl - Preprocessing to distinguish categorical from scale.
5 dnl - Testing details of missing value handling in summaries.
6 dnl - test CLABELS ROWLABELS=LAYER.
8 dnl - Test WEIGHT and adjustment weights.
9 dnl - Summary functions:
10 dnl * Separate summary functions for totals and subtotals.
11 dnl * )CILEVEL in summary label specification
15 dnl * ascending/descending
18 dnl * THRU (numeric ranges)
21 dnl * MINCOLWIDTH, MAXCOLWIDTH, UNITS.
24 dnl - HIDESMALLCOUNTS.
25 dnl - Date/time variables and values
26 dnl - Special formats for summary functions: NEGPAREN, NEQUAL, PAREN, PCTPAREN.
27 dnl - TITLES: )DATE, )TIME, )TABLE.
29 dnl * PCOMPUTE for more than one kind of summary (e.g. [COUNT, ROWPCT]).
30 dnl * MISSING, OTHERNM
31 dnl * multi-dimensional (multiple CCT_POSTCOMPUTE in one cell)
35 dnl - Summary functions:
36 dnl * U-prefix for unweighted summaries.
37 dnl * areaPCT.SUM and UareaPCT.SUM functions.
38 dnl - SPLIT FILE with SEPARATE splits
39 dnl - Definition of columns/rows when labels are rotated from one axis to another.
42 dnl - Multiple response sets
43 dnl - MRSETS subcommand.
44 dnl - CATEGORIES: Special case for explicit category specifications and multiple dichotomy sets.
47 dnl - Summary functions:
48 dnl * .LCL and .UCL suffixes.
51 dnl * Data-dependent sorting.
53 AT_SETUP([CTABLES parsing])
54 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
55 AT_DATA([ctables.sps],
58 /FORMAT MINCOLWIDTH=10 MAXCOLWIDTH=20 UNITS=POINTS EMPTY=ZERO MISSING="x"
59 /FORMAT MINCOLWIDTH=DEFAULT MAXCOLWIDTH=DEFAULT UNITS=INCHES EMPTY=BLANK MISSING="."
60 /FORMAT UNITS=CM EMPTY="(-)"
61 /VLABELS VARIABLES=qn1 DISPLAY=DEFAULT
62 /VLABELS VARIABLES=qn17 DISPLAY=NAME
63 /VLABELS VARIABLES=qns3a DISPLAY=LABEL
64 /VLABELS VARIABLES=qnd1 DISPLAY=BOTH
65 /VLABELS VARIABLES=qn20 DISPLAY=NONE
66 /MRSETS COUNTDUPLICATES=NO
67 /MRSETS COUNTDUPLICATES=YES
70 /WEIGHT VARIABLE=qns3a
72 /HIDESMALLCOUNTS COUNT=10
74 /SLABELS POSITION=COLUMN VISIBLE=YES
75 /SLABELS VISIBLE=NO POSITION=ROW
76 /SLABELS POSITION=LAYER
78 /CLABELS ROWLABELS=OPPOSITE
80 /CATEGORIES VARIABLES=qn1 qn17
81 ORDER=A KEY=VALUE MISSING=INCLUDE TOTAL=YES LABEL="xyzzy"
82 POSITION=BEFORE EMPTY=INCLUDE.
83 CTABLES /TABLE qnsa1 /CLABELS ROWLABELS=LAYER.
84 CTABLES /TABLE qnsa1 /CLABELS COLLABELS=OPPOSITE.
85 CTABLES /TABLE qnsa1 /CLABELS COLLABELS=LAYER.
87 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
90 ╭───────────────────┬────┬────╮
92 ├───────────────────┼────┼────┤
93 │Sa1. SAMPLE SOURCE:│5392│1607│
94 ╰───────────────────┴────┴────╯
98 ╭───────────────────┬─────╮
100 ├───────────────────┼─────┤
101 │Sa1. SAMPLE SOURCE:│ 5392│
102 ╰───────────────────┴─────╯
105 ╭────────────────────────┬─────╮
107 ├────────────────────────┼─────┤
108 │Sa1. SAMPLE SOURCE: RDD │ 5392│
110 ╰────────────────────────┴─────╯
113 ╭────────────────────────┬─────╮
115 ├────────────────────────┼─────┤
116 │Sa1. SAMPLE SOURCE: RDD │ 5392│
118 ╰────────────────────────┴─────╯
122 AT_SETUP([CTABLES parsing - negative])
123 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
124 AT_DATA([ctables.sps],
127 CTABLES /FORMAT MINCOLWIDTH='foo'.
128 CTABLES /TABLE qn1 [**].
129 CTABLES /TABLE qn1 [NOTAFUNCTION].
132 CTABLES /TABLE NOTAVAR.
134 CTABLES /TABLE string[S].
135 CTABLES /TABLE qn1 [PTILE 101].
136 CTABLES /TABLE qn1 [MEAN F0.1].
137 CTABLES /TABLE qn1 [MEAN NEGPAREN1.2].
138 CTABLES /TABLE qn1 [MEAN NEGPAREN3.4].
139 CTABLES /TABLE qn1 [MEAN TOTALS].
140 CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
141 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [SUBTOTAL=x].
142 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [LO **].
143 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [LO THRU x].
144 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [1 THRU **].
145 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['x' THRU **].
146 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&**].
147 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&x].
148 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=PTILE(qn1, 101).
149 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=MEAN(qn1.
150 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=MEAN.
151 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 MISSING=**.
152 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 TOTAL=**.
153 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 LABEL=**.
154 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 POSITION=**.
155 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 EMPTY=**.
156 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 **.
157 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [1,2,3] **.
158 CTABLES /PCOMPUTE &k=EXPR(SUBTOTAL[0]).
159 CTABLES /PCOMPUTE &k=EXPR(SUBTOTAL[1**]).
160 CTABLES /PCOMPUTE &k=EXPR([LO **]).
161 CTABLES /PCOMPUTE &k=EXPR([LO THRU **]).
162 CTABLES /PCOMPUTE &k=EXPR([1 THRU **]).
163 CTABLES /PCOMPUTE &k=EXPR([1**]).
164 CTABLES /PCOMPUTE &k=EXPR((1x)).
165 CTABLES /PCOMPUTE **k.
166 CTABLES /PCOMPUTE &1.
167 CTABLES /PCOMPUTE &k**.
168 CTABLES /PCOMPUTE &k=**.
169 CTABLES /PCOMPUTE &k=EXPR**.
170 CTABLES /PCOMPUTE &k=EXPR(1x).
171 CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
172 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k FORMAT=NOTAFUNCTION.
173 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k FORMAT=PTILE **.
174 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k LABEL=**.
175 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k HIDESOURCECATS=**.
176 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k **.
177 CTABLES /FORMAT EMPTY=**.
178 CTABLES /FORMAT MISSING=**.
180 CTABLES /FORMAT MINCOLWIDTH=20 MAXCOLWIDTH=10/.
182 CTABLES /VLABELS VARIABLES=NOTAVAR.
183 CTABLES /VLABELS VARIABLES=qn1 **.
184 CTABLES /VLABELS VARIABLES=qn1 DISPLAY=**.
186 CTABLES /MRSETS COUNTDUPLICATES=**.
187 CTABLES /SMISSING **.
189 CTABLES /WEIGHT VARIABLE=NOTAVAR.
190 CTABLES /HIDESMALLCOUNTS COUNT=1.
192 CTABLES /HIDESMALLCOUNTS COUNT=2.
193 CTABLES /TABLE qn1**.
194 CTABLES /TABLE qn1 /SLABELS POSITION=**.
195 CTABLES /TABLE qn1 /SLABELS VISIBLE=**.
196 CTABLES /TABLE qn1 /SLABELS **.
197 CTABLES /TABLE qn1 /CLABELS ROWLABELS=**.
198 CTABLES /TABLE qn1 /CLABELS COLLABELS=**.
199 CTABLES /TABLE qn1 /CLABELS **.
200 CTABLES /TABLE qn1 /CRITERIA **.
201 CTABLES /TABLE qn1 /CRITERIA CILEVEL=101.
202 CTABLES /TABLE qn1 /TITLES **.
203 CTABLES /TABLE qn1 /SIGTEST TYPE=**.
204 CTABLES /TABLE qn1 /SIGTEST ALPHA=**.
205 CTABLES /TABLE qn1 /SIGTEST INCLUDEMRSETS=**.
206 CTABLES /TABLE qn1 /SIGTEST CATEGORIES=**.
207 CTABLES /TABLE qn1 /SIGTEST **.
208 CTABLES /TABLE qn1 /COMPARETEST TYPE=**.
209 CTABLES /TABLE qn1 /COMPARETEST ALPHA=**.
210 CTABLES /TABLE qn1 /COMPARETEST ALPHA=0,5.
211 CTABLES /TABLE qn1 /COMPARETEST ADJUST=**.
212 CTABLES /TABLE qn1 /COMPARETEST INCLUDEMRSETS=**.
213 CTABLES /TABLE qn1 /COMPARETEST MEANSVARIANCE=**.
214 CTABLES /TABLE qn1 /COMPARETEST CATEGORIES=**.
215 CTABLES /TABLE qn1 /COMPARETEST MERGE=**.
216 CTABLES /TABLE qn1 /COMPARETEST STYLE=**.
217 CTABLES /TABLE qn1 /COMPARETEST SHOWSIG=**.
218 CTABLES /TABLE qn1 /COMPARETEST **.
219 CTABLES /TABLE qn1 / **.
220 CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CLABELS COLLABELS=OPPOSITE.
221 CTABLES /TABLE qn20 > qnd1.
222 CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
223 NUMERIC datetime (DATETIME17.0).
224 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=datetime ['123'].
226 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [1],
227 [[ctables.sps:2.8: error: CTABLES: Syntax error at end of command: expecting `/'.
229 ctables.sps:3.29-3.33: error: CTABLES: Syntax error at `'foo'': Expected non-
230 negative number for MINCOLWIDTH.
232 ctables.sps:4.21-4.22: error: CTABLES: Syntax error at `**': expecting
235 ctables.sps:5.21-5.32: error: CTABLES: Syntax error at `NOTAFUNCTION': Expecting
236 summary function name.
238 ctables.sps:6.20: error: CTABLES: Syntax error at end of command: expecting `@:}@'.
240 ctables.sps:7.16-7.17: error: CTABLES: Syntax error at `**': expecting
243 ctables.sps:8: error: CTABLES: NOTAVAR is not a variable name.
245 ctables.sps:10.16-10.24: error: CTABLES: Cannot use string variable string as a
247 10 | CTABLES /TABLE string[S].
250 ctables.sps:11.27-11.29: error: CTABLES: Syntax error at `101': Expected number
251 between 0 and 100 for PTILE.
253 ctables.sps:12: error: CTABLES: Output format F0.1 specifies width 0, but F
254 requires a width between 1 and 40.
256 ctables.sps:13.26-13.36: error: CTABLES: Syntax error at `NEGPAREN1.2': Output
257 format NEGPAREN requires width 2 or greater.
259 ctables.sps:14.26-14.36: error: CTABLES: Syntax error at `NEGPAREN3.4': Output
260 format NEGPAREN requires width greater than decimals.
262 ctables.sps:15.21-15.24: error: CTABLES: Summary function MEAN applies only to
264 15 | CTABLES /TABLE qn1 [MEAN TOTALS].
267 ctables.sps:15.16-15.18: note: CTABLES: 'QN1' is not a scale variable.
268 15 | CTABLES /TABLE qn1 [MEAN TOTALS].
271 ctables.sps:15.32: error: CTABLES: Syntax error at `@:>@': expecting `@<:@'.
273 ctables.sps:16.21-16.24: error: CTABLES: Summary function MEAN applies only to
275 16 | CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
278 ctables.sps:16.16-16.18: note: CTABLES: 'QN1' is not a scale variable.
279 16 | CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
282 ctables.sps:16.40: error: CTABLES: Syntax error at `%': expecting `@:>@'.
284 ctables.sps:17.56: error: CTABLES: Syntax error at `x': expecting string.
286 ctables.sps:18.50-18.51: error: CTABLES: Syntax error at `**': expecting THRU.
288 ctables.sps:19.55: error: CTABLES: Syntax error at `x': expecting number.
290 ctables.sps:20.54-20.55: error: CTABLES: Syntax error at `**': expecting number.
292 ctables.sps:21.56-21.57: error: CTABLES: Syntax error at `**': expecting string.
294 ctables.sps:22.48-22.49: error: CTABLES: Syntax error at `**': expecting
297 ctables.sps:23.47-23.48: error: CTABLES: Unknown postcompute &x.
298 23 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&x].
301 ctables.sps:24.61-24.63: error: CTABLES: Syntax error at `101': Expected number
302 between 0 and 100 for PTILE.
304 ctables.sps:25.58: error: CTABLES: Syntax error at end of command: expecting
307 ctables.sps:26.54: error: CTABLES: Syntax error at end of command: expecting
310 ctables.sps:27.54-27.55: error: CTABLES: Syntax error at `**': expecting INCLUDE
313 ctables.sps:28.52-28.53: error: CTABLES: Syntax error at `**': expecting YES or
316 ctables.sps:29.52-29.53: error: CTABLES: Syntax error at `**': expecting string.
318 ctables.sps:30.55-30.56: error: CTABLES: Syntax error at `**': expecting BEFORE
321 ctables.sps:31.52-31.53: error: CTABLES: Syntax error at `**': expecting INCLUDE
324 ctables.sps:32.46-32.47: error: CTABLES: Syntax error at `**': expecting ORDER,
325 KEY, MISSING, TOTAL, LABEL, POSITION, or EMPTY.
327 ctables.sps:33.54-33.55: error: CTABLES: Syntax error at `**': expecting TOTAL,
328 LABEL, POSITION, or EMPTY.
330 ctables.sps:34.36: error: CTABLES: Syntax error at `0': Expected positive
331 integer for SUBTOTAL.
333 ctables.sps:35.37-35.38: error: CTABLES: Syntax error at `**': expecting `@:>@'.
335 ctables.sps:36.31-36.32: error: CTABLES: Syntax error at `**': expecting THRU.
337 ctables.sps:37.36-37.37: error: CTABLES: Syntax error at `**': expecting number.
339 ctables.sps:38.35-38.36: error: CTABLES: Syntax error at `**': expecting number.
341 ctables.sps:39.29-39.30: error: CTABLES: Syntax error at `**': expecting `@:>@'.
343 ctables.sps:40.29: error: CTABLES: Syntax error at `x': expecting `@:}@'.
345 ctables.sps:41.19-41.20: error: CTABLES: Syntax error at `**': expecting &.
347 ctables.sps:42.20: error: CTABLES: Syntax error at `1': expecting identifier.
349 ctables.sps:43.21-43.22: error: CTABLES: Syntax error at `**': expecting `='.
351 ctables.sps:44.22-44.23: error: CTABLES: Syntax error at `**': expecting EXPR.
353 ctables.sps:45.26-45.27: error: CTABLES: Syntax error at `**': expecting `('.
355 ctables.sps:46.28: error: CTABLES: Syntax error at `x': expecting `)'.
357 ctables.sps:47.31-47.49: warning: CTABLES: New definition of &k will override
358 the previous definition.
359 47 | CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
360 | ^~~~~~~~~~~~~~~~~~~
362 ctables.sps:47.10-47.28: note: CTABLES: This is the previous definition.
363 47 | CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
364 | ^~~~~~~~~~~~~~~~~~~
366 ctables.sps:47.50: error: CTABLES: Syntax error at end of command: expecting
369 ctables.sps:48.53-48.64: error: CTABLES: Syntax error at `NOTAFUNCTION':
370 Expecting summary function name.
372 ctables.sps:49.59-49.60: error: CTABLES: Syntax error at `**': Expected number
373 between 0 and 100 for PTILE.
375 ctables.sps:50.52-50.53: error: CTABLES: Syntax error at `**': expecting string.
377 ctables.sps:51.61-51.62: error: CTABLES: Syntax error at `**': expecting YES or
380 ctables.sps:52.46-52.47: error: CTABLES: Syntax error at `**': expecting LABEL,
381 FORMAT, or HIDESOURCECATS.
383 ctables.sps:53.23-53.24: error: CTABLES: Syntax error at `**': expecting string.
385 ctables.sps:54.25-54.26: error: CTABLES: Syntax error at `**': expecting string.
387 ctables.sps:55.17-55.18: error: CTABLES: Syntax error at `**': expecting
388 MINCOLWIDTH, MAXCOLWIDTH, UNITS, EMPTY, or MISSING.
390 ctables.sps:56: error: CTABLES: MINCOLWIDTH must not be greater than
393 ctables.sps:57.18-57.19: error: CTABLES: Syntax error at `**': expecting
396 ctables.sps:58: error: CTABLES: NOTAVAR is not a variable name.
398 ctables.sps:59.32-59.33: error: CTABLES: Syntax error at `**': expecting
401 ctables.sps:60.40-60.41: error: CTABLES: Syntax error at `**': expecting
402 DEFAULT, NAME, LABEL, BOTH, or NONE.
404 ctables.sps:61.17-61.18: error: CTABLES: Syntax error at `**': expecting
407 ctables.sps:62.33-62.34: error: CTABLES: Syntax error at `**': expecting YES or
410 ctables.sps:63.19-63.20: error: CTABLES: Syntax error at `**': expecting
411 VARIABLE or LISTWISE.
413 ctables.sps:64.17-64.18: error: CTABLES: Syntax error at `**': expecting
416 ctables.sps:65: error: CTABLES: NOTAVAR is not a variable name.
418 ctables.sps:66.32: error: CTABLES: Syntax error at `1': Expected integer 2 or
419 greater for HIDESMALLCOUNTS COUNT.
421 ctables.sps:67.10-67.13: error: CTABLES: Syntax error at `QUUX': expecting
422 FORMAT, VLABELS, MRSETS, SMISSING, PCOMPUTE, PPROPERTIES, WEIGHT,
423 HIDESMALLCOUNTS, or TABLE.
425 ctables.sps:68.33: error: CTABLES: Syntax error at end of command: expecting
428 ctables.sps:69.19-69.20: error: CTABLES: Syntax error at `**': expecting `/'.
430 ctables.sps:70.38-70.39: error: CTABLES: Syntax error at `**': expecting COLUMN,
433 ctables.sps:71.37-71.38: error: CTABLES: Syntax error at `**': expecting YES or
436 ctables.sps:72.29-72.30: error: CTABLES: Syntax error at `**': expecting
439 ctables.sps:73.39-73.40: error: CTABLES: Syntax error at `**': expecting
442 ctables.sps:74.39-74.40: error: CTABLES: Syntax error at `**': expecting
445 ctables.sps:75.29-75.30: error: CTABLES: Syntax error at `**': expecting AUTO,
446 ROWLABELS, or COLLABELS.
448 ctables.sps:76.30-76.31: error: CTABLES: Syntax error at `**': expecting
451 ctables.sps:77.38-77.40: error: CTABLES: Syntax error at `101': Expected number
452 in @<:@0,100@:}@ for CILEVEL.
454 ctables.sps:78.28-78.29: error: CTABLES: Syntax error at `**': expecting
455 CAPTION, CORNER, or TITLE.
457 ctables.sps:79.34-79.35: error: CTABLES: Syntax error at `**': expecting
460 ctables.sps:80.35-80.36: error: CTABLES: Syntax error at `**': Expected number
461 in @<:@0,1@:}@ for ALPHA.
463 ctables.sps:81.43-81.44: error: CTABLES: Syntax error at `**': expecting YES or
466 ctables.sps:82.40-82.41: error: CTABLES: Syntax error at `**': expecting
467 ALLVISIBLE or SUBTOTALS.
469 ctables.sps:83.29-83.30: error: CTABLES: Syntax error at `**': expecting TYPE,
470 ALPHA, INCLUDEMRSETS, or CATEGORIES.
472 ctables.sps:84.38-84.39: error: CTABLES: Syntax error at `**': expecting PROP or
475 ctables.sps:85.39-85.40: error: CTABLES: Syntax error at `**': Expected number
478 ctables.sps:86.39: error: CTABLES: Syntax error at `0': Expected number in (0,1)
481 ctables.sps:87.40-87.41: error: CTABLES: Syntax error at `**': expecting
482 BONFERRONI, BH, or NONE.
484 ctables.sps:88.47-88.48: error: CTABLES: Syntax error at `**': expecting YES or
487 ctables.sps:89.47-89.48: error: CTABLES: Syntax error at `**': expecting ALLCATS
490 ctables.sps:90.44-90.45: error: CTABLES: Syntax error at `**': expecting
491 ALLVISIBLE or SUBTOTALS.
493 ctables.sps:91.39-91.40: error: CTABLES: Syntax error at `**': expecting YES or
496 ctables.sps:92.39-92.40: error: CTABLES: Syntax error at `**': expecting APA or
499 ctables.sps:93.41-93.42: error: CTABLES: Syntax error at `**': expecting YES or
502 ctables.sps:94.33-94.34: error: CTABLES: Syntax error at `**': expecting TYPE,
503 ALPHA, ADJUST, INCLUDEMRSETS, MEANSVARIANCE, CATEGORIES, MERGE, STYLE, or
506 ctables.sps:95.22-95.23: error: CTABLES: Syntax error at `**': expecting TABLE,
507 SLABELS, CLABELS, CRITERIA, CATEGORIES, TITLES, SIGTEST, or COMPARETEST.
509 ctables.sps:96: error: CTABLES: ROWLABELS and COLLABELS may not both be
512 ctables.sps:97.16-97.26: error: CTABLES: Cannot nest scale variables.
513 97 | CTABLES /TABLE qn20 > qnd1.
516 ctables.sps:97.16-97.19: note: CTABLES: This is an outer scale variable.
517 97 | CTABLES /TABLE qn20 > qnd1.
520 ctables.sps:97.23-97.26: note: CTABLES: This is an inner scale variable.
521 97 | CTABLES /TABLE qn20 > qnd1.
524 ctables.sps:98.16-98.35: error: CTABLES: Summaries may only be requested for
525 categorical variables at the innermost nesting level.
526 98 | CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
527 | ^~~~~~~~~~~~~~~~~~~~
529 ctables.sps:98.16-98.18: note: CTABLES: This outer categorical variable has a
531 98 | CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
534 ctables.sps:100.52-100.56: error: CTABLES: Failed to parse category
535 specification as format DATETIME: Day (123) must be between 1 and 31..
536 100 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=datetime ['123'].
539 ctables.sps:23: error: CTABLES: Summaries may appear only on one axis.
541 ctables.sps:23.16-23.20: note: CTABLES: This variable on the rows axis has a
543 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
546 ctables.sps:23.33-23.37: note: CTABLES: This variable on the columns axis has a
548 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
551 ctables.sps:23.50-23.54: note: CTABLES: This variable on the layers axis has a
553 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
558 AT_SETUP([CTABLES parsing - more negative])
559 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
560 AT_DATA([ctables.sps],
562 CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
563 CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
564 CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
567 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['string'].
568 CTABLES /TABLE string /CATEGORIES VARIABLES=string [1].
570 CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn1 KEY=MEAN(qn1).
572 CTABLES /TABLE qnd1 /CLABELS ROWLABELS=OPPOSITE.
573 CTABLES /TABLE qn1 + string /CLABELS ROWLABELS=OPPOSITE.
574 CTABLES /TABLE qn1 + qnsa1 /CLABELS ROWLABELS=OPPOSITE.
575 CTABLES /TABLE qn105ba + qn105bb /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn105ba [1,2,3].
577 CTABLES /PCOMPUTE &x=EXPR(1**2**3).
578 CTABLES /PCOMPUTE &x=EXPR([**]).
579 CTABLES /PCOMPUTE &x=EXPR(**).
583 CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
585 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [1],
586 [[ctables.sps:2.76-2.78: error: CTABLES: Computed category &pc references a
587 category not included in the category list.
588 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
593 ctables.sps:2.28-2.35: note: CTABLES: This is the missing category.
594 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
598 ctables.sps:2.76-2.79: note: CTABLES: To fix the problem, add subtotals to the
599 list of categories here.
600 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
605 ctables.sps:3.73-3.75: error: CTABLES: Computed category &pc references a
606 category not included in the category list.
607 3 | CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1
612 ctables.sps:3.28-3.32: note: CTABLES: This is the missing category.
613 3 | CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1
617 ctables.sps:3: note: CTABLES: To fix the problem, add TOTAL=YES to the
618 variable's CATEGORIES specification.
620 ctables.sps:4.76-4.99: error: CTABLES: These categories include 2 instances of
621 SUBTOTAL or HSUBTOTAL, so references from computed categories must refer to
622 subtotals by position, e.g. SUBTOTAL[1].
623 4 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
624 VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
626 ^~~~~~~~~~~~~~~~~~~~~~~~
628 ctables.sps:4.28-4.35: note: CTABLES: This is the reference that lacks a
630 4 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
631 VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
634 ctables.sps:7.47-7.54: error: CTABLES: This category specification may be
635 applied only to string variables, but this subcommand tries to apply it to
636 numeric variable QN1.
637 7 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['string'].
640 ctables.sps:8.53: error: CTABLES: This category specification may be applied
641 only to numeric variables, but this subcommand tries to apply it to string
643 8 | CTABLES /TABLE string /CATEGORIES VARIABLES=string [1].
646 ctables.sps:10: error: CTABLES: ROWLABELS=OPPOSITE is not allowed with sorting
647 based on a summary function.
649 ctables.sps:12: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
650 moved to be categorical, but qnd1 is a scale variable.
652 ctables.sps:13: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
653 moved to have the same width, but QN1 has width 0 and string has width 8.
655 ctables.sps:14: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
656 moved to have the same value labels, but QN1 and QNSA1 have different value
659 ctables.sps:15: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
660 moved to have the same category specifications, but QN105BA and QN105BB have
661 different category specifications.
663 ctables.sps:17.27-17.33: warning: CTABLES: The exponentiation operator (`**') is
664 left-associative: `a**b**c' equals `(a**b)**c', not `a**(b**c)'. To disable
665 this warning, insert parentheses.
666 17 | CTABLES /PCOMPUTE &x=EXPR(1**2**3).
669 ctables.sps:17.35: error: CTABLES: Syntax error at end of command: expecting
672 ctables.sps:18.28-18.29: error: CTABLES: Syntax error at `**'.
674 ctables.sps:19.27-19.28: error: CTABLES: Syntax error at `**'.
676 ctables.sps:21.15: error: CTABLES: Syntax error at end of command: At least one
677 variable must be specified.
679 ctables.sps:23: error: CTABLES: Summaries may appear only on one axis.
681 ctables.sps:23.16-23.20: note: CTABLES: This variable on the rows axis has a
683 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
686 ctables.sps:23.33-23.37: note: CTABLES: This variable on the columns axis has a
688 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
691 ctables.sps:23.50-23.54: note: CTABLES: This variable on the layers axis has a
693 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
698 AT_SETUP([CTABLES one categorical variable])
699 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
700 AT_DATA([ctables.sps],
703 CTABLES /TABLE BY qn1.
704 CTABLES /TABLE BY BY qn1.
706 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
708 ╭────────────────────────────────────────────────────────────────────────┬─────╮
710 ├────────────────────────────────────────────────────────────────────────┼─────┤
711 │ 1. How often do you usually drive a car or other Every day │ 4667│
712 │motor vehicle? Several days a week │ 1274│
713 │ Once a week or less │ 361│
714 │ Only certain times a │ 130│
717 ╰────────────────────────────────────────────────────────────────────────┴─────╯
720 ╭──────────────────────────────────────────────────────────────────────────────╮
721 │ 1. How often do you usually drive a car or other motor vehicle? │
722 ├─────────┬──────────────────┬──────────────────┬────────────────────────┬─────┤
723 │ │ Several days a │ Once a week or │ Only certain times a │ │
724 │Every day│ week │ less │ year │Never│
725 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
726 │ Count │ Count │ Count │ Count │Count│
727 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
728 │ 4667│ 1274│ 361│ 130│ 540│
729 ╰─────────┴──────────────────┴──────────────────┴────────────────────────┴─────╯
741 AT_SETUP([CTABLES one string variable])
742 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
743 AT_DATA([ctables.sps],
746 MISSING VALUES licensed('DontKnow', 'Refused').
747 RECODE qnd7a(1='Yes')(2='No')(3='DontKnow')(4='Refused') INTO licensed.
748 CTABLES /TABLE licensed.
749 CTABLES /TABLE licensed [COUNT, TOTALS[COUNT, VALIDN]] /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE.
750 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['Yes', 'No'] TOTAL=YES.
751 * Notice that the string matching is case-sensitive.
752 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['Yes', 'no'] TOTAL=YES.
753 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['No' THRU 'yes'] TOTAL=YES.
755 /PCOMPUTE ¬yes=EXPR(['No']+['DontKnow']+['Refused'])
756 /PPROPERTIES ¬yes LABEL='Not Yes' HIDESOURCECATS=YES
758 /CATEGORIES VARIABLES=licensed ['Yes', ¬yes, 'No', 'DontKnow', 'Refused'].
760 /PCOMPUTE ¬yes=EXPR(['DontKnow' THRU 'No'] + ['Refused'])
761 /PPROPERTIES ¬yes LABEL='Not Yes' HIDESOURCECATS=YES
763 /CATEGORIES VARIABLES=licensed ['Yes', ¬yes, 'DontKnow' THRU 'No', 'Refused'].
765 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
775 ╭─────────────────┬─────┬───────╮
777 ├─────────────────┼─────┼───────┤
778 │licensed DontKnow│ 4│ │
782 │ Total │ 6999│ 6951│
783 ╰─────────────────┴─────┴───────╯
786 ╭──────────────┬─────╮
788 ├──────────────┼─────┤
789 │licensed Yes │ 6379│
792 ╰──────────────┴─────╯
795 ╭──────────────┬─────╮
797 ├──────────────┼─────┤
798 │licensed Yes │ 6379│
801 ╰──────────────┴─────╯
804 ╭────────────────┬─────╮
806 ├────────────────┼─────┤
811 ╰────────────────┴─────╯
814 ╭────────────────┬─────╮
816 ├────────────────┼─────┤
817 │licensed Yes │ 6379│
819 ╰────────────────┴─────╯
822 ╭────────────────┬─────╮
824 ├────────────────┼─────┤
825 │licensed Yes │ 6379│
827 ╰────────────────┴─────╯
831 AT_SETUP([CTABLES one scale variable])
832 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
833 AT_DATA([ctables.sps],
835 CTABLES /TABLE qnd1[COUNT, VALIDN, TOTALN, MEAN, STDDEV, MINIMUM, MAXIMUM].
836 CTABLES /TABLE BY qnd1.
837 CTABLES /TABLE BY BY qnd1.
839 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
841 ╭──────────────────────┬─────┬───────┬───────┬────┬────────────┬───────┬───────╮
842 │ │ │ │ │ │ Std │ │ │
843 │ │Count│Valid N│Total N│Mean│ Deviation │Minimum│Maximum│
844 ├──────────────────────┼─────┼───────┼───────┼────┼────────────┼───────┼───────┤
845 │D1. AGE: What is your │ 6999│ 6930│ 6999│ 48│ 19│ 16│ 86│
846 │age? │ │ │ │ │ │ │ │
847 ╰──────────────────────┴─────┴───────┴───────┴────┴────────────┴───────┴───────╯
850 ╭──────────────────────────╮
851 │D1. AGE: What is your age?│
852 ├──────────────────────────┤
854 ├──────────────────────────┤
856 ╰──────────────────────────╯
859 D1. AGE: What is your age?
868 AT_SETUP([CTABLES simple stacking])
869 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
870 AT_DATA([ctables.sps],
872 CTABLES /TABLE qn105ba + qn105bb + qn105bc + qn105bd BY qns3a [COLPCT PCT8.0].
874 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
876 ╭───────────────────────────────────────────────────────────────┬──────────────╮
883 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
884 │105b. How likely is it that drivers who have had Almost │ 10%│ 11%│
885 │too much to drink to drive safely will A. Get certain │ │ │
886 │stopped by the police? Very likely │ 21%│ 22%│
887 │ Somewhat │ 38%│ 42%│
889 │ Somewhat │ 21%│ 18%│
893 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
894 │105b. How likely is it that drivers who have had Almost │ 14%│ 18%│
895 │too much to drink to drive safely will B. Have an certain │ │ │
896 │accident? Very likely │ 36%│ 45%│
897 │ Somewhat │ 39%│ 32%│
903 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
904 │105b. How likely is it that drivers who have had Almost │ 18%│ 16%│
905 │too much to drink to drive safely will C. Be certain │ │ │
906 │convicted for drunk driving? Very likely │ 32%│ 28%│
907 │ Somewhat │ 27%│ 32%│
909 │ Somewhat │ 15%│ 15%│
913 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
914 │105b. How likely is it that drivers who have had Almost │ 16%│ 16%│
915 │too much to drink to drive safely will D. Be certain │ │ │
916 │arrested for drunk driving? Very likely │ 26%│ 27%│
917 │ Somewhat │ 32%│ 35%│
919 │ Somewhat │ 17%│ 15%│
923 ╰───────────────────────────────────────────────────────────────┴──────┴───────╯
927 AT_SETUP([CTABLES show or hide empty categories])
928 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
929 AT_DATA([ctables.sps],
931 IF (qn105ba = 2) qn105ba = 1.
932 IF (qns3a = 1) qns3a = 2.
933 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0].
934 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
935 /CATEGORIES VAR=qn105ba EMPTY=EXCLUDE.
936 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
937 /CATEGORIES VAR=qns3a EMPTY=EXCLUDE.
938 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
939 /CATEGORIES VAR=ALL EMPTY=EXCLUDE.
941 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
943 ╭──────────────────────────────────────────────────────────────┬───────────────╮
950 ├──────────────────────────────────────────────────────────────┼───────┼───────┤
951 │105b. How likely is it that drivers who have had Almost │ .│ 32%│
952 │too much to drink to drive safely will A. Get certain │ │ │
953 │stopped by the police? Very likely│ .│ 0%│
960 ╰──────────────────────────────────────────────────────────────┴───────┴───────╯
963 ╭──────────────────────────────────────────────────────────────┬───────────────╮
970 ├──────────────────────────────────────────────────────────────┼───────┼───────┤
971 │105b. How likely is it that drivers who have had Almost │ .│ 32%│
972 │too much to drink to drive safely will A. Get certain │ │ │
973 │stopped by the police? Somewhat │ .│ 40%│
979 ╰──────────────────────────────────────────────────────────────┴───────┴───────╯
982 ╭────────────────────────────────────────────────────────────────────┬─────────╮
989 ├────────────────────────────────────────────────────────────────────┼─────────┤
990 │105b. How likely is it that drivers who have had too Almost │ 32%│
991 │much to drink to drive safely will A. Get stopped by certain │ │
992 │the police? Very likely │ 0%│
999 ╰────────────────────────────────────────────────────────────────────┴─────────╯
1002 ╭────────────────────────────────────────────────────────────────────┬─────────╮
1009 ├────────────────────────────────────────────────────────────────────┼─────────┤
1010 │105b. How likely is it that drivers who have had too Almost │ 32%│
1011 │much to drink to drive safely will A. Get stopped by certain │ │
1012 │the police? Somewhat │ 40%│
1018 ╰────────────────────────────────────────────────────────────────────┴─────────╯
1022 AT_SETUP([CTABLES simple nesting])
1023 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1024 AT_DATA([ctables.sps],
1026 CTABLES /TABLE (qn105ba + qn105bb + qn105bc + qn105bd) > qns3a [COUNT, TABLEPCT PCT8.0]
1027 /CATEGORIES VARIABLES=qns3a TOTAL=YES.
1028 CTABLES /TABLE qns3a > (qn105ba + qn105bb + qn105bc + qn105bd) [TABLEPCT PCT8.0]
1029 /CATEGORIES VARIABLES=qns3a TOTAL=YES
1030 /CLABELS ROW=OPPOSITE.
1032 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1034 ╭─────────────────────────────────────────────────────────────────┬─────┬──────╮
1037 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1038 │105b. How likely is it that drivers Almost S3a. Male │ 297│ 4%│
1039 │who have had too much to drink to certain GENDER: Female│ 403│ 6%│
1040 │drive safely will A. Get stopped by Total │ 700│ 10%│
1041 │the police? ╶──────────────────────────┼─────┼──────┤
1042 │ Very S3a. Male │ 660│ 10%│
1043 │ likely GENDER: Female│ 842│ 12%│
1044 │ Total │ 1502│ 22%│
1045 │ ╶──────────────────────────┼─────┼──────┤
1046 │ Somewhat S3a. Male │ 1174│ 17%│
1047 │ likely GENDER: Female│ 1589│ 23%│
1048 │ Total │ 2763│ 40%│
1049 │ ╶──────────────────────────┼─────┼──────┤
1050 │ Somewhat S3a. Male │ 640│ 9%│
1051 │ unlikely GENDER: Female│ 667│ 10%│
1052 │ Total │ 1307│ 19%│
1053 │ ╶──────────────────────────┼─────┼──────┤
1054 │ Very S3a. Male │ 311│ 5%│
1055 │ unlikely GENDER: Female│ 298│ 4%│
1057 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1058 │105b. How likely is it that drivers Almost S3a. Male │ 429│ 6%│
1059 │who have had too much to drink to certain GENDER: Female│ 671│ 10%│
1060 │drive safely will B. Have an accident? Total │ 1100│ 16%│
1061 │ ╶──────────────────────────┼─────┼──────┤
1062 │ Very S3a. Male │ 1104│ 16%│
1063 │ likely GENDER: Female│ 1715│ 25%│
1064 │ Total │ 2819│ 41%│
1065 │ ╶──────────────────────────┼─────┼──────┤
1066 │ Somewhat S3a. Male │ 1203│ 17%│
1067 │ likely GENDER: Female│ 1214│ 18%│
1068 │ Total │ 2417│ 35%│
1069 │ ╶──────────────────────────┼─────┼──────┤
1070 │ Somewhat S3a. Male │ 262│ 4%│
1071 │ unlikely GENDER: Female│ 168│ 2%│
1073 │ ╶──────────────────────────┼─────┼──────┤
1074 │ Very S3a. Male │ 81│ 1%│
1075 │ unlikely GENDER: Female│ 59│ 1%│
1077 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1078 │105b. How likely is it that drivers Almost S3a. Male │ 539│ 8%│
1079 │who have had too much to drink to certain GENDER: Female│ 610│ 9%│
1080 │drive safely will C. Be convicted for Total │ 1149│ 17%│
1081 │drunk driving? ╶──────────────────────────┼─────┼──────┤
1082 │ Very S3a. Male │ 988│ 14%│
1083 │ likely GENDER: Female│ 1049│ 15%│
1084 │ Total │ 2037│ 30%│
1085 │ ╶──────────────────────────┼─────┼──────┤
1086 │ Somewhat S3a. Male │ 822│ 12%│
1087 │ likely GENDER: Female│ 1210│ 18%│
1088 │ Total │ 2032│ 30%│
1089 │ ╶──────────────────────────┼─────┼──────┤
1090 │ Somewhat S3a. Male │ 446│ 7%│
1091 │ unlikely GENDER: Female│ 548│ 8%│
1093 │ ╶──────────────────────────┼─────┼──────┤
1094 │ Very S3a. Male │ 268│ 4%│
1095 │ unlikely GENDER: Female│ 354│ 5%│
1097 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1098 │105b. How likely is it that drivers Almost S3a. Male │ 498│ 7%│
1099 │who have had too much to drink to certain GENDER: Female│ 603│ 9%│
1100 │drive safely will D. Be arrested for Total │ 1101│ 16%│
1101 │drunk driving? ╶──────────────────────────┼─────┼──────┤
1102 │ Very S3a. Male │ 805│ 12%│
1103 │ likely GENDER: Female│ 1029│ 15%│
1104 │ Total │ 1834│ 27%│
1105 │ ╶──────────────────────────┼─────┼──────┤
1106 │ Somewhat S3a. Male │ 975│ 14%│
1107 │ likely GENDER: Female│ 1332│ 19%│
1108 │ Total │ 2307│ 34%│
1109 │ ╶──────────────────────────┼─────┼──────┤
1110 │ Somewhat S3a. Male │ 535│ 8%│
1111 │ unlikely GENDER: Female│ 560│ 8%│
1112 │ Total │ 1095│ 16%│
1113 │ ╶──────────────────────────┼─────┼──────┤
1114 │ Very S3a. Male │ 270│ 4%│
1115 │ unlikely GENDER: Female│ 279│ 4%│
1117 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
1120 ╭─────────────────────────────────┬────────┬──────┬─────────┬─────────┬────────╮
1121 │ │ Almost │ Very │ Somewhat│ Somewhat│ Very │
1122 │ │ certain│likely│ likely │ unlikely│unlikely│
1123 │ ├────────┼──────┼─────────┼─────────┼────────┤
1125 │ │ Table %│ % │ Table % │ Table % │ Table %│
1126 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1127 │S3a. Male 105b. How likely │ 4%│ 10%│ 17%│ 9%│ 5%│
1128 │GENDER: is it that drivers│ │ │ │ │ │
1129 │ who have had too │ │ │ │ │ │
1130 │ much to drink to │ │ │ │ │ │
1131 │ drive safely will │ │ │ │ │ │
1132 │ A. Get stopped by │ │ │ │ │ │
1133 │ the police? │ │ │ │ │ │
1134 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1135 │ Female 105b. How likely │ 6%│ 12%│ 23%│ 10%│ 4%│
1136 │ is it that drivers│ │ │ │ │ │
1137 │ who have had too │ │ │ │ │ │
1138 │ much to drink to │ │ │ │ │ │
1139 │ drive safely will │ │ │ │ │ │
1140 │ A. Get stopped by │ │ │ │ │ │
1141 │ the police? │ │ │ │ │ │
1142 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1143 │ Total 105b. How likely │ 10%│ 22%│ 40%│ 19%│ 9%│
1144 │ is it that drivers│ │ │ │ │ │
1145 │ who have had too │ │ │ │ │ │
1146 │ much to drink to │ │ │ │ │ │
1147 │ drive safely will │ │ │ │ │ │
1148 │ A. Get stopped by │ │ │ │ │ │
1149 │ the police? │ │ │ │ │ │
1150 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1151 │S3a. Male 105b. How likely │ 6%│ 16%│ 17%│ 4%│ 1%│
1152 │GENDER: is it that drivers│ │ │ │ │ │
1153 │ who have had too │ │ │ │ │ │
1154 │ much to drink to │ │ │ │ │ │
1155 │ drive safely will │ │ │ │ │ │
1156 │ B. Have an │ │ │ │ │ │
1157 │ accident? │ │ │ │ │ │
1158 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1159 │ Female 105b. How likely │ 10%│ 25%│ 18%│ 2%│ 1%│
1160 │ is it that drivers│ │ │ │ │ │
1161 │ who have had too │ │ │ │ │ │
1162 │ much to drink to │ │ │ │ │ │
1163 │ drive safely will │ │ │ │ │ │
1164 │ B. Have an │ │ │ │ │ │
1165 │ accident? │ │ │ │ │ │
1166 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1167 │ Total 105b. How likely │ 16%│ 41%│ 35%│ 6%│ 2%│
1168 │ is it that drivers│ │ │ │ │ │
1169 │ who have had too │ │ │ │ │ │
1170 │ much to drink to │ │ │ │ │ │
1171 │ drive safely will │ │ │ │ │ │
1172 │ B. Have an │ │ │ │ │ │
1173 │ accident? │ │ │ │ │ │
1174 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1175 │S3a. Male 105b. How likely │ 8%│ 14%│ 12%│ 7%│ 4%│
1176 │GENDER: is it that drivers│ │ │ │ │ │
1177 │ who have had too │ │ │ │ │ │
1178 │ much to drink to │ │ │ │ │ │
1179 │ drive safely will │ │ │ │ │ │
1180 │ C. Be convicted │ │ │ │ │ │
1181 │ for drunk driving?│ │ │ │ │ │
1182 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1183 │ Female 105b. How likely │ 9%│ 15%│ 18%│ 8%│ 5%│
1184 │ is it that drivers│ │ │ │ │ │
1185 │ who have had too │ │ │ │ │ │
1186 │ much to drink to │ │ │ │ │ │
1187 │ drive safely will │ │ │ │ │ │
1188 │ C. Be convicted │ │ │ │ │ │
1189 │ for drunk driving?│ │ │ │ │ │
1190 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1191 │ Total 105b. How likely │ 17%│ 30%│ 30%│ 15%│ 9%│
1192 │ is it that drivers│ │ │ │ │ │
1193 │ who have had too │ │ │ │ │ │
1194 │ much to drink to │ │ │ │ │ │
1195 │ drive safely will │ │ │ │ │ │
1196 │ C. Be convicted │ │ │ │ │ │
1197 │ for drunk driving?│ │ │ │ │ │
1198 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1199 │S3a. Male 105b. How likely │ 7%│ 12%│ 14%│ 8%│ 4%│
1200 │GENDER: is it that drivers│ │ │ │ │ │
1201 │ who have had too │ │ │ │ │ │
1202 │ much to drink to │ │ │ │ │ │
1203 │ drive safely will │ │ │ │ │ │
1204 │ D. Be arrested for│ │ │ │ │ │
1205 │ drunk driving? │ │ │ │ │ │
1206 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1207 │ Female 105b. How likely │ 9%│ 15%│ 19%│ 8%│ 4%│
1208 │ is it that drivers│ │ │ │ │ │
1209 │ who have had too │ │ │ │ │ │
1210 │ much to drink to │ │ │ │ │ │
1211 │ drive safely will │ │ │ │ │ │
1212 │ D. Be arrested for│ │ │ │ │ │
1213 │ drunk driving? │ │ │ │ │ │
1214 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1215 │ Total 105b. How likely │ 16%│ 27%│ 34%│ 16%│ 8%│
1216 │ is it that drivers│ │ │ │ │ │
1217 │ who have had too │ │ │ │ │ │
1218 │ much to drink to │ │ │ │ │ │
1219 │ drive safely will │ │ │ │ │ │
1220 │ D. Be arrested for│ │ │ │ │ │
1221 │ drunk driving? │ │ │ │ │ │
1222 ╰─────────────────────────────────┴────────┴──────┴─────────┴─────────┴────────╯
1226 AT_SETUP([CTABLES nesting and scale variables])
1227 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1228 AT_DATA([ctables.sps],
1230 CTABLES /TABLE=qnd1 > qn1 BY qns3a.
1231 CTABLES /TABLE=qnd1 [MINIMUM, MAXIMUM, MEAN] > qns3a > (qn26 + qn27).
1232 CTABLES /TABLE=qnsa1 > qn105ba [COLPCT] BY qns1
1233 /CATEGORIES VAR=qnsa1 EMPTY=EXCLUDE.
1234 CTABLES /TABLE=AgeGroup > qn20 [MEAN F8.1, STDDEV F8.1].
1236 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1238 ╭─────────────────────────────────────────────────────────────────┬────────────╮
1244 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1245 │D1. AGE: What 1. How often do you usually drive Every day │ 46│ 46│
1246 │is your age? a car or other motor vehicle? Several days a │ 51│ 59│
1248 │ Once a week or │ 44│ 54│
1250 │ Only certain │ 34│ 41│
1251 │ times a year │ │ │
1253 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
1256 ╭─────────────────────────────────────────────────────────┬───────┬───────┬────╮
1257 │ │Minimum│Maximum│Mean│
1258 ├─────────────────────────────────────────────────────────┼───────┼───────┼────┤
1259 │D1. AGE: S3a. Male 26. During the last 12 Yes│ 16│ 86│ 42│
1260 │What is GENDER: months, has there been a │ │ │ │
1261 │your time when you felt you │ │ │ │
1262 │age? should cut down on your No │ 16│ 86│ 46│
1264 │ ╶───────────────────────────────────────┼───────┼───────┼────┤
1265 │ Female 26. During the last 12 Yes│ 16│ 86│ 43│
1266 │ months, has there been a │ │ │ │
1267 │ time when you felt you │ │ │ │
1268 │ should cut down on your No │ 16│ 86│ 48│
1270 ├─────────────────────────────────────────────────────────┼───────┼───────┼────┤
1271 │D1. AGE: S3a. Male 27. During the last 12 Yes│ 16│ 86│ 38│
1272 │What is GENDER: months, has there been a │ │ │ │
1273 │your time when people criticized No │ 16│ 86│ 46│
1274 │age? your drinking? │ │ │ │
1275 │ ╶───────────────────────────────────────┼───────┼───────┼────┤
1276 │ Female 27. During the last 12 Yes│ 17│ 69│ 37│
1277 │ months, has there been a │ │ │ │
1278 │ time when people criticized No │ 16│ 86│ 48│
1279 │ your drinking? │ │ │ │
1280 ╰─────────────────────────────────────────────────────────┴───────┴───────┴────╯
1283 ╭─────────────────────────────┬────────────────────────────────────────────────╮
1284 │ │S1. Including yourself, how many members of this│
1285 │ │ household are age 16 or older? │
1286 │ ├──────┬──────┬──────┬──────┬──────┬──────┬──────┤
1287 │ │ │ │ │ │ │ │ 6 or │
1288 │ │ None │ 1 │ 2 │ 3 │ 4 │ 5 │ more │
1289 │ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
1290 │ │Column│Column│Column│Column│Column│Column│Column│
1291 │ │ % │ % │ % │ % │ % │ % │ % │
1292 ├─────────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
1293 │Sa1. RDD 105b. Almost │ .│ 9.5%│ 8.2%│ 12.4%│ 9.9%│ 20.0%│ 23.8%│
1294 │SAMPLE How certain │ │ │ │ │ │ │ │
1295 │SOURCE: likely │ │ │ │ │ │ │ │
1296 │ is it Very │ .│ 24.9%│ 18.5%│ 24.0%│ 26.6%│ 25.5%│ 33.3%│
1297 │ that likely │ │ │ │ │ │ │ │
1298 │ drivers │ │ │ │ │ │ │ │
1299 │ who have │ │ │ │ │ │ │ │
1300 │ had too Somewhat│ .│ 38.3%│ 41.9%│ 38.6%│ 37.5%│ 36.4%│ 23.8%│
1301 │ much to likely │ │ │ │ │ │ │ │
1302 │ drink to │ │ │ │ │ │ │ │
1303 │ drive │ │ │ │ │ │ │ │
1304 │ safely Somewhat│ .│ 18.1%│ 21.7%│ 16.8%│ 16.7%│ 10.9%│ 9.5%│
1305 │ will A. unlikely│ │ │ │ │ │ │ │
1306 │ Get │ │ │ │ │ │ │ │
1307 │ stopped Very │ .│ 9.2%│ 9.7%│ 8.2%│ 9.4%│ 7.3%│ 9.5%│
1308 │ by the unlikely│ │ │ │ │ │ │ │
1309 │ police? │ │ │ │ │ │ │ │
1310 ╰─────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
1313 ╭──────────────────────────────────────────────────────────────┬────┬──────────╮
1316 ├──────────────────────────────────────────────────────────────┼────┼──────────┤
1317 │Age 16 to 25 20. On how many of the thirty days in this │ 5.2│ 6.0│
1318 │group typical month did you have one or more │ │ │
1319 │ alcoholic beverages to drink? │ │ │
1320 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1321 │ 26 to 35 20. On how many of the thirty days in this │ 4.7│ 5.9│
1322 │ typical month did you have one or more │ │ │
1323 │ alcoholic beverages to drink? │ │ │
1324 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1325 │ 36 to 45 20. On how many of the thirty days in this │ 5.5│ 6.8│
1326 │ typical month did you have one or more │ │ │
1327 │ alcoholic beverages to drink? │ │ │
1328 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1329 │ 46 to 55 20. On how many of the thirty days in this │ 5.8│ 7.7│
1330 │ typical month did you have one or more │ │ │
1331 │ alcoholic beverages to drink? │ │ │
1332 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1333 │ 56 to 65 20. On how many of the thirty days in this │ 6.3│ 8.2│
1334 │ typical month did you have one or more │ │ │
1335 │ alcoholic beverages to drink? │ │ │
1336 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1337 │ 66 or 20. On how many of the thirty days in this │ 7.1│ 9.2│
1338 │ older typical month did you have one or more │ │ │
1339 │ alcoholic beverages to drink? │ │ │
1340 ╰──────────────────────────────────────────────────────────────┴────┴──────────╯
1345 AT_SETUP([CTABLES SLABELS])
1346 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1347 AT_DATA([ctables.sps],
1349 CTABLES /TABLE qn1 [COUNT COLPCT].
1350 CTABLES /TABLE qn1 [COUNT COLPCT]
1351 /SLABELS POSITION=ROW.
1352 CTABLES /TABLE qn1 [COUNT COLPCT]
1353 /SLABELS POSITION=ROW VISIBLE=NO.
1355 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1357 ╭────────────────────────────────────────────────────────────────┬─────┬───────╮
1360 ├────────────────────────────────────────────────────────────────┼─────┼───────┤
1361 │ 1. How often do you usually drive a car or Every day │ 4667│ 66.9%│
1362 │other motor vehicle? Several days a week│ 1274│ 18.3%│
1363 │ Once a week or less│ 361│ 5.2%│
1364 │ Only certain times │ 130│ 1.9%│
1366 │ Never │ 540│ 7.7%│
1367 ╰────────────────────────────────────────────────────────────────┴─────┴───────╯
1370 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1371 │ 1. How often do you usually drive a car or Every day Count │ 4667│
1372 │other motor vehicle? Column │66.9%│
1374 │ ╶───────────────────────────┼─────┤
1375 │ Several days a week Count │ 1274│
1378 │ ╶───────────────────────────┼─────┤
1379 │ Once a week or less Count │ 361│
1382 │ ╶───────────────────────────┼─────┤
1383 │ Only certain times Count │ 130│
1384 │ a year Column │ 1.9%│
1386 │ ╶───────────────────────────┼─────┤
1387 │ Never Count │ 540│
1390 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1393 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1394 │ 1. How often do you usually drive a car or other Every day │ 4667│
1395 │motor vehicle? │66.9%│
1396 │ Several days a week │ 1274│
1398 │ Once a week or less │ 361│
1400 │ Only certain times a │ 130│
1404 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1408 AT_SETUP([CTABLES simple totals])
1409 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1410 AT_DATA([ctables.sps],
1413 /CATEGORIES VARIABLES=qn17 TOTAL=YES LABEL='Number responding'.
1414 DESCRIPTIVES qn18/STATISTICS=MEAN.
1415 CTABLES /TABLE=region > qn18 [MEAN, COUNT, VALIDN, TOTALN]
1416 /CATEGORIES VARIABLES=region TOTAL=YES LABEL='All regions'.
1418 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1420 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1422 ├────────────────────────────────────────────────────────────────────────┼─────┤
1423 │17. When you drink alcoholic beverages, which ONE of OR, something else│ 2│
1424 │the following beverages do you drink MOST OFTEN? Beer │ 1073│
1427 │ Wine coolers │ 137│
1428 │ Hard liquor or │ 888│
1430 │ Flavored malt │ 83│
1432 │ Number responding │ 4221│
1433 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1435 Descriptive Statistics
1436 ╭────────────────────────────────────────────────────────────────────┬────┬────╮
1438 ├────────────────────────────────────────────────────────────────────┼────┼────┤
1439 │18. When you drink ANSWERFROM(QN17R1), about how many │4218│4.62│
1440 │ANSWERFROM(QN17R2) do you usually drink per sitting? │ │ │
1441 │Valid N (listwise) │6999│ │
1442 │Missing N (listwise) │2781│ │
1443 ╰────────────────────────────────────────────────────────────────────┴────┴────╯
1446 ╭──────────────────────────────────────────────────────┬────┬─────┬──────┬─────╮
1447 │ │ │ │ Valid│Total│
1448 │ │Mean│Count│ N │ N │
1449 ├──────────────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1450 │Region NE 18. When you drink ANSWERFROM(QN17R1),│4.36│ 1409│ 949│ 1409│
1451 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1452 │ you usually drink per sitting? │ │ │ │ │
1453 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1454 │ MW 18. When you drink ANSWERFROM(QN17R1),│4.67│ 1654│ 1027│ 1654│
1455 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1456 │ you usually drink per sitting? │ │ │ │ │
1457 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1458 │ S 18. When you drink ANSWERFROM(QN17R1),│4.71│ 2390│ 1287│ 2390│
1459 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1460 │ you usually drink per sitting? │ │ │ │ │
1461 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1462 │ W 18. When you drink ANSWERFROM(QN17R1),│4.69│ 1546│ 955│ 1546│
1463 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1464 │ you usually drink per sitting? │ │ │ │ │
1465 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1466 │ All 18. When you drink ANSWERFROM(QN17R1),│4.62│ 6999│ 4218│ 6999│
1467 │ regions about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1468 │ you usually drink per sitting? │ │ │ │ │
1469 ╰──────────────────────────────────────────────────────┴────┴─────┴──────┴─────╯
1473 AT_SETUP([CTABLES subtotals])
1474 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1475 AT_DATA([ctables.sps],
1477 CTABLES /TABLE=qn105ba BY qns1
1478 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, SUBTOTAL].
1479 CTABLES /TABLE=qn105ba [COLPCT] BY qns1
1480 /CATEGORIES VARIABLES=qn105ba [1, 2, 3, SUBTOTAL, 4, 5, SUBTOTAL].
1481 CTABLES /TABLE=qn105ba BY qns1
1482 /CATEGORIES VARIABLES=qn105ba [1, 2, 3, SUBTOTAL, 4, 5, SUBTOTAL]
1483 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, SUBTOTAL].
1485 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
1487 ╭─────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────╮
1488 │ │ S1. Including yourself, how many members of this household │
1489 │ │ are age 16 or older? │
1490 │ ├───────┬───────┬─────────┬───────┬────────┬──────┬──────────┤
1491 │ │ 1 │ 2 │ Subtotal│ 3 │ 4 │ 5 │ Subtotal │
1492 │ ├───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1493 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
1494 ├─────────────────────────────────────────────────────────┼───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1495 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 62│ 19│ 11│ 92│
1496 │had too much to drink to drive safely will A. certain │ │ │ │ │ │ │ │
1497 │Get stopped by the police? Very likely│ 384│ 552│ 936│ 120│ 51│ 14│ 185│
1498 │ Somewhat │ 590│ 1249│ 1839│ 193│ 72│ 20│ 285│
1499 │ likely │ │ │ │ │ │ │ │
1500 │ Somewhat │ 278│ 647│ 925│ 84│ 32│ 6│ 122│
1501 │ unlikely │ │ │ │ │ │ │ │
1502 │ Very │ 141│ 290│ 431│ 41│ 18│ 4│ 63│
1503 │ unlikely │ │ │ │ │ │ │ │
1504 ╰─────────────────────────────────────────────────────────┴───────┴───────┴─────────┴───────┴────────┴──────┴──────────╯
1507 ╭────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────╮
1508 │ │ S1. Including yourself, how many members of this household │
1509 │ │ are age 16 or older? │
1510 │ ├────────┬────────┬────────┬────────┬───────┬────────┬────────┤
1511 │ │ │ │ │ │ │ │ 6 or │
1512 │ │ None │ 1 │ 2 │ 3 │ 4 │ 5 │ more │
1513 │ ├────────┼────────┼────────┼────────┼───────┼────────┼────────┤
1514 │ │ │ │ │ │ Column│ │ │
1515 │ │Column %│Column %│Column %│Column %│ % │Column %│Column %│
1516 ├────────────────────────────────────────────────────────┼────────┼────────┼────────┼────────┼───────┼────────┼────────┤
1517 │105b. How likely is it that drivers who have Almost │ .│ 9.5%│ 8.2%│ 12.4%│ 9.9%│ 20.0%│ 23.8%│
1518 │had too much to drink to drive safely will certain │ │ │ │ │ │ │ │
1519 │A. Get stopped by the police? Very likely│ .│ 24.9%│ 18.5%│ 24.0%│ 26.6%│ 25.5%│ 33.3%│
1520 │ Somewhat │ .│ 38.3%│ 41.9%│ 38.6%│ 37.5%│ 36.4%│ 23.8%│
1521 │ likely │ │ │ │ │ │ │ │
1522 │ Subtotal │ │ 72.8%│ 68.6%│ 75.0%│ 74.0%│ 81.8%│ 81.0%│
1523 │ Somewhat │ .│ 18.1%│ 21.7%│ 16.8%│ 16.7%│ 10.9%│ 9.5%│
1524 │ unlikely │ │ │ │ │ │ │ │
1525 │ Very │ .│ 9.2%│ 9.7%│ 8.2%│ 9.4%│ 7.3%│ 9.5%│
1526 │ unlikely │ │ │ │ │ │ │ │
1527 │ Subtotal │ │ 27.2%│ 31.4%│ 25.0%│ 26.0%│ 18.2%│ 19.0%│
1528 ╰────────────────────────────────────────────────────────┴────────┴────────┴────────┴────────┴───────┴────────┴────────╯
1531 ╭─────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────╮
1532 │ │ S1. Including yourself, how many members of this household │
1533 │ │ are age 16 or older? │
1534 │ ├───────┬───────┬─────────┬───────┬────────┬──────┬──────────┤
1535 │ │ 1 │ 2 │ Subtotal│ 3 │ 4 │ 5 │ Subtotal │
1536 │ ├───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1537 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
1538 ├─────────────────────────────────────────────────────────┼───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1539 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 62│ 19│ 11│ 92│
1540 │had too much to drink to drive safely will A. certain │ │ │ │ │ │ │ │
1541 │Get stopped by the police? Very likely│ 384│ 552│ 936│ 120│ 51│ 14│ 185│
1542 │ Somewhat │ 590│ 1249│ 1839│ 193│ 72│ 20│ 285│
1543 │ likely │ │ │ │ │ │ │ │
1544 │ Subtotal │ 1121│ 2047│ 3168│ 375│ 142│ 45│ 562│
1545 │ Somewhat │ 278│ 647│ 925│ 84│ 32│ 6│ 122│
1546 │ unlikely │ │ │ │ │ │ │ │
1547 │ Very │ 141│ 290│ 431│ 41│ 18│ 4│ 63│
1548 │ unlikely │ │ │ │ │ │ │ │
1549 │ Subtotal │ 419│ 937│ 1356│ 125│ 50│ 10│ 185│
1550 ╰─────────────────────────────────────────────────────────┴───────┴───────┴─────────┴───────┴────────┴──────┴──────────╯
1554 AT_SETUP([CTABLES PCOMPUTE])
1555 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1556 AT_DATA([ctables.sps],
1559 /PCOMPUTE &x=EXPR([3] + [4])
1560 /PCOMPUTE &y=EXPR([4] + [5])
1561 /PPROPERTIES &x LABEL='3+4' HIDESOURCECATS=YES FORMAT=COUNT F8.2
1562 /PPROPERTIES &y LABEL='4+5'
1563 /TABLE=qn105ba BY qns1
1564 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, &x, &y, SUBTOTAL]
1566 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
1568 ╭────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────╮
1569 │ │ S1. Including yourself, how many members of this household │
1570 │ │ are age 16 or older? │
1571 │ ├───────┬───────┬──────────┬───────┬────────┬──────┬──────────┤
1572 │ │ 1 │ 2 │ Subtotal │ 5 │ 3+4 │ 4+5 │ Subtotal │
1573 │ ├───────┼───────┼──────────┼───────┼────────┼──────┼──────────┤
1574 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
1575 ├────────────────────────────────────────────────────────┼───────┼───────┼──────────┼───────┼────────┼──────┼──────────┤
1576 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 11│ 81.00│ 30│ 92│
1577 │had too much to drink to drive safely will certain │ │ │ │ │ │ │ │
1578 │A. Get stopped by the police? Very likely│ 384│ 552│ 936│ 14│ 171.00│ 65│ 185│
1579 │ Somewhat │ 590│ 1249│ 1839│ 20│ 265.00│ 92│ 285│
1580 │ likely │ │ │ │ │ │ │ │
1581 │ Somewhat │ 278│ 647│ 925│ 6│ 116.00│ 38│ 122│
1582 │ unlikely │ │ │ │ │ │ │ │
1583 │ Very │ 141│ 290│ 431│ 4│ 59.00│ 22│ 63│
1584 │ unlikely │ │ │ │ │ │ │ │
1585 ╰────────────────────────────────────────────────────────┴───────┴───────┴──────────┴───────┴────────┴──────┴──────────╯
1589 AT_SETUP([CTABLES CLABELS])
1590 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1591 AT_DATA([ctables.sps],
1593 CTABLES /TABLE AgeGroup BY qns3a /CLABELS ROWLABELS=OPPOSITE.
1594 CTABLES /TABLE AgeGroup BY qns3a /CLABELS COLLABELS=OPPOSITE.
1596 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
1598 ╭───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
1600 │ ├──────────────────────────────────────────────────────┬───────────────────────────────────────────────────────┤
1602 │ ├─────────┬───────┬──────┬──────┬──────┬───────┬───────┼──────────┬──────┬───────┬──────┬──────┬──────┬────────┤
1603 │ │ 15 or │ 16 to │ 26 to│ 36 to│ 46 to│ 56 to │ 66 or │ 15 or │ 16 to│ 26 to │ 36 to│ 46 to│ 56 to│ 66 or │
1604 │ │ younger │ 25 │ 35 │ 45 │ 55 │ 65 │ older │ younger │ 25 │ 35 │ 45 │ 55 │ 65 │ older │
1605 │ ├─────────┼───────┼──────┼──────┼──────┼───────┼───────┼──────────┼──────┼───────┼──────┼──────┼──────┼────────┤
1606 │ │ Count │ Count │ Count│ Count│ Count│ Count │ Count │ Count │ Count│ Count │ Count│ Count│ Count│ Count │
1607 ├───────┼─────────┼───────┼──────┼──────┼──────┼───────┼───────┼──────────┼──────┼───────┼──────┼──────┼──────┼────────┤
1608 │Age │ 0│ 594│ 476│ 489│ 526│ 516│ 531│ 0│ 505│ 491│ 548│ 649│ 731│ 943│
1609 │group │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1610 ╰───────┴─────────┴───────┴──────┴──────┴──────┴───────┴───────┴──────────┴──────┴───────┴──────┴──────┴──────┴────────╯
1613 ╭──────────────────────────────┬────────────╮
1617 ├──────────────────────────────┼────────────┤
1618 │Age group 15 or younger Male │ 0│
1620 │ ╶────────────────────┼────────────┤
1621 │ 16 to 25 Male │ 594│
1623 │ ╶────────────────────┼────────────┤
1624 │ 26 to 35 Male │ 476│
1626 │ ╶────────────────────┼────────────┤
1627 │ 36 to 45 Male │ 489│
1629 │ ╶────────────────────┼────────────┤
1630 │ 46 to 55 Male │ 526│
1632 │ ╶────────────────────┼────────────┤
1633 │ 56 to 65 Male │ 516│
1635 │ ╶────────────────────┼────────────┤
1636 │ 66 or older Male │ 531│
1638 ╰──────────────────────────────┴────────────╯
1642 AT_SETUP([CTABLES missing values])
1643 AT_DATA([ctables.sps],
1644 [[DATA LIST LIST NOTABLE/x y.
1683 MISSING VALUES x (1, 2) y (2, 3).
1684 VARIABLE LEVEL ALL (NOMINAL).
1686 CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN,
1687 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
1688 /CATEGORIES VARIABLES=ALL TOTAL=YES.
1689 CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN,
1690 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
1691 /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE.
1692 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
1693 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
1694 /CATEGORIES VARIABLES=ALL TOTAL=YES
1695 /SLABELS POSITION=ROW.
1696 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
1697 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
1698 /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE
1699 /SLABELS POSITION=ROW.
1700 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
1701 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
1702 /CATEGORIES VARIABLES=x [1, 2, 3, 4] TOTAL=YES
1703 /CATEGORIES VARIABLES=y [1, 3, 4, 5] TOTAL=YES
1704 /SLABELS POSITION=ROW.
1706 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
1708 ╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
1709 │ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
1710 ├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
1711 │x 3.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
1712 │ 4.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
1713 │ 5.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
1714 │ Total│ 18│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
1715 ╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
1716 dnl Note that Column Total N % doesn't add up to 100 because missing
1717 dnl values are included in the total but not shown as a category and this
1718 dnl is expected behavior.
1721 ╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
1722 │ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
1723 ├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
1724 │x 1.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
1725 │ 2.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
1726 │ 3.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
1727 │ 4.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
1728 │ 5.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
1729 │ Total│ 30│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
1730 ╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
1731 dnl Note that Column Total N % doesn't add up to 100 because system-missing
1732 dnl values are included in the total but not shown as a category and this
1733 dnl is expected behavior.
1736 ╭────────────────────────┬───────────────────────────╮
1738 │ ├──────┬──────┬──────┬──────┤
1739 │ │ 1.00 │ 4.00 │ 5.00 │ Total│
1740 ├────────────────────────┼──────┼──────┼──────┼──────┤
1741 │x 3.00 Count │ 1│ 1│ 1│ 3│
1742 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
1743 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
1744 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ .│
1745 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
1746 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
1747 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
1748 │ Valid N │ │ │ │ 3│
1749 │ Total N │ │ │ │ 6│
1750 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
1751 │ 4.00 Count │ 1│ 1│ 1│ 3│
1752 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
1753 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
1754 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ .│
1755 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
1756 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
1757 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
1758 │ Valid N │ │ │ │ 3│
1759 │ Total N │ │ │ │ 6│
1760 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
1761 │ 5.00 Count │ 1│ 1│ 1│ 3│
1762 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
1763 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
1764 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ .│
1765 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
1766 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
1767 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
1768 │ Valid N │ │ │ │ 3│
1769 │ Total N │ │ │ │ 6│
1770 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
1771 │ Total Count │ 3│ 3│ 3│ 9│
1772 │ Column % │100.0%│100.0%│100.0%│ .│
1773 │ Column Valid N %│100.0%│100.0%│100.0%│ .│
1774 │ Column Total N %│100.0%│100.0%│100.0%│ .│
1775 │ Row % │ .│ .│ .│ .│
1776 │ Row Valid N % │ .│ .│ .│ .│
1777 │ Row Total N % │ .│ .│ .│ .│
1778 │ Valid N │ 3│ 3│ 3│ 9│
1779 │ Total N │ 6│ 6│ 6│ 36│
1780 ╰────────────────────────┴──────┴──────┴──────┴──────╯
1783 ╭────────────────────────┬─────────────────────────────────────────╮
1785 │ ├──────┬──────┬──────┬──────┬──────┬──────┤
1786 │ │ 1.00 │ 2.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
1787 ├────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
1788 │x 1.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
1789 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1790 │ Column Valid N %│ .0%│ .│ .│ .0%│ .0%│ .│
1791 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
1792 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
1793 │ Row Valid N % │ .│ .│ .│ .│ .│ .│
1794 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1795 │ Valid N │ │ │ │ │ │ 0│
1796 │ Total N │ │ │ │ │ │ 6│
1797 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
1798 │ 2.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
1799 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1800 │ Column Valid N %│ .0%│ .│ .│ .0%│ .0%│ .│
1801 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
1802 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
1803 │ Row Valid N % │ .│ .│ .│ .│ .│ .│
1804 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1805 │ Valid N │ │ │ │ │ │ 0│
1806 │ Total N │ │ │ │ │ │ 6│
1807 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
1808 │ 3.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
1809 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1810 │ Column Valid N %│ 33.3%│ .│ .│ 33.3%│ 33.3%│ .│
1811 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
1812 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
1813 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
1814 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1815 │ Valid N │ │ │ │ │ │ 3│
1816 │ Total N │ │ │ │ │ │ 6│
1817 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
1818 │ 4.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
1819 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1820 │ Column Valid N %│ 33.3%│ .│ .│ 33.3%│ 33.3%│ .│
1821 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
1822 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
1823 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
1824 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1825 │ Valid N │ │ │ │ │ │ 3│
1826 │ Total N │ │ │ │ │ │ 6│
1827 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
1828 │ 5.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
1829 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1830 │ Column Valid N %│ 33.3%│ .│ .│ 33.3%│ 33.3%│ .│
1831 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
1832 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
1833 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
1834 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1835 │ Valid N │ │ │ │ │ │ 3│
1836 │ Total N │ │ │ │ │ │ 6│
1837 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
1838 │ Total Count │ 5│ 5│ 5│ 5│ 5│ 25│
1839 │ Column % │100.0%│100.0%│100.0%│100.0%│100.0%│ .│
1840 │ Column Valid N %│100.0%│ .│ .│100.0%│100.0%│ .│
1841 │ Column Total N %│100.0%│100.0%│100.0%│100.0%│100.0%│ .│
1842 │ Row % │ .│ .│ .│ .│ .│ .│
1843 │ Row Valid N % │ .│ .│ .│ .│ .│ .│
1844 │ Row Total N % │ .│ .│ .│ .│ .│ .│
1845 │ Valid N │ 3│ 0│ 0│ 3│ 3│ 9│
1846 │ Total N │ 6│ 6│ 6│ 6│ 6│ 36│
1847 ╰────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────╯
1850 ╭────────────────────────┬──────────────────────────────────╮
1852 │ ├──────┬──────┬──────┬──────┬──────┤
1853 │ │ 1.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
1854 ├────────────────────────┼──────┼──────┼──────┼──────┼──────┤
1855 │x 1.00 Count │ 1│ 1│ 1│ 1│ 4│
1856 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
1857 │ Column Valid N %│ .0%│ .│ .0%│ .0%│ .│
1858 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1859 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
1860 │ Row Valid N % │ .│ .│ .│ .│ .│
1861 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1862 │ Valid N │ │ │ │ │ 0│
1863 │ Total N │ │ │ │ │ 6│
1864 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
1865 │ 2.00 Count │ 1│ 1│ 1│ 1│ 4│
1866 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
1867 │ Column Valid N %│ .0%│ .│ .0%│ .0%│ .│
1868 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1869 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
1870 │ Row Valid N % │ .│ .│ .│ .│ .│
1871 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1872 │ Valid N │ │ │ │ │ 0│
1873 │ Total N │ │ │ │ │ 6│
1874 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
1875 │ 3.00 Count │ 1│ 1│ 1│ 1│ 4│
1876 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
1877 │ Column Valid N %│ 50.0%│ .│ 50.0%│ 50.0%│ .│
1878 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1879 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
1880 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
1881 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1882 │ Valid N │ │ │ │ │ 3│
1883 │ Total N │ │ │ │ │ 6│
1884 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
1885 │ 4.00 Count │ 1│ 1│ 1│ 1│ 4│
1886 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
1887 │ Column Valid N %│ 50.0%│ .│ 50.0%│ 50.0%│ .│
1888 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1889 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
1890 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
1891 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1892 │ Valid N │ │ │ │ │ 3│
1893 │ Total N │ │ │ │ │ 6│
1894 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
1895 │ Total Count │ 4│ 4│ 4│ 4│ 16│
1896 │ Column % │100.0%│100.0%│100.0%│100.0%│ .│
1897 │ Column Valid N %│100.0%│ .│100.0%│100.0%│ .│
1898 │ Column Total N %│100.0%│100.0%│100.0%│100.0%│ .│
1899 │ Row % │ .│ .│ .│ .│ .│
1900 │ Row Valid N % │ .│ .│ .│ .│ .│
1901 │ Row Total N % │ .│ .│ .│ .│ .│
1902 │ Valid N │ 2│ 0│ 2│ 2│ 6│
1903 │ Total N │ 5│ 5│ 5│ 5│ 30│
1904 ╰────────────────────────┴──────┴──────┴──────┴──────┴──────╯
1908 AT_SETUP([CTABLES SMISSING=LISTWISE])
1909 AT_KEYWORDS([SMISSING LISTWISE])
1910 AT_DATA([ctables.sps],
1911 [[DATA LIST LIST NOTABLE/x y z.
1919 VARIABLE LEVEL x (NOMINAL).
1921 CTABLES /TABLE (y + z) > x.
1922 CTABLES /SMISSING LISTWISE /TABLE (y + z) > x.
1924 * The following doesn't come out as listwise because the tables are
1925 separate, not linked by an > operator.
1926 CTABLES /SMISSING LISTWISE /TABLE (y > x) + (z > x).
1928 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl