3 dnl Features not yet implemented:
5 dnl - SPLIT FILE with SEPARATE splits
6 dnl - Definition of columns/rows when labels are rotated from one axis to another.
7 dnl - Preprocessing to distinguish categorical from scale.
8 dnl - )CILEVEL in summary specifications
9 dnl - Summary functions:
10 dnl * Unimplemented ones.
11 dnl * U-prefix for unweighted summaries.
12 dnl * .LCL and .UCL suffixes.
15 dnl * Data-dependent sorting.
17 dnl * multi-dimensional
18 dnl * MISSING, OTHERNM
21 dnl * summary statistics and formats?
23 dnl Features not yet tested:
24 dnl - Parsing (positive and negative)
25 dnl - String variables and values
26 dnl - Testing details of missing value handling in summaries.
27 dnl - test CLABELS ROWLABELS=LAYER.
29 dnl - Test WEIGHT and adjustment weights.
30 dnl - Test PCOMPUTE and PPROPERTIES.
31 dnl - EMPTY=INCLUDE For string ranges.
32 dnl - Summary functions:
33 dnl * Separate summary functions for totals and subtotals.
37 dnl * THRU (numeric ranges)
38 dnl * THRU (string ranges)
41 dnl * MINCOLWIDTH, MAXCOLWIDTH, UNITS.
44 dnl - HIDESMALLCOUNTS.
45 dnl - Date/time variables and values
46 dnl - Special formats for summary functions: NEGPAREN, NEQUAL, PAREN, PCTPAREN.
47 dnl - TITLES: )DATE, )TIME, )TABLE.
52 dnl - Multiple response sets
53 dnl - MRSETS subcommand.
54 dnl - CATEGORIES: Special case for explicit category specifications and multiple dichotomy sets.
60 dnl CTABLES /TABLE=qnd1 [MEAN, MEDIAN] BY qns3a.
61 dnl produces a bad median:
63 dnl +--------------------------+-----------------------+
64 dnl | | S3a. GENDER: |
65 dnl | +-----------+-----------+
66 dnl | | Male | Female |
67 dnl | +----+------+----+------+
68 dnl | |Mean|Median|Mean|Median|
69 dnl +--------------------------+----+------+----+------+
70 dnl |D1. AGE: What is your age?| 46| 999| 50| 999|
71 dnl +--------------------------+----+------+----+------+
75 # AT_SETUP([CTABLES parsing])
76 # AT_DATA([ctables.sps],
77 # [[DATA LIST LIST NOTABLE /x y z.
78 # CTABLES /TABLE=(x + y) > z.
79 # CTABLES /TABLE=(x[c] + y[c]) > z.
80 # CTABLES /TABLE=(x + y) > z[c].
81 # CTABLES /TABLE=x BY y BY z.
82 # CTABLES /TABLE=x[c] [ROWPCT.COUNT] > y[c].
83 # CTABLES /TABLE=x[c] > y[c] [ROWPCT.COUNT].
85 # AT_CHECK([pspp ctables.sps])
88 AT_SETUP([CTABLES one categorical variable])
89 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
90 AT_DATA([ctables.sps],
93 CTABLES /TABLE BY qn1.
94 CTABLES /TABLE BY BY qn1.
96 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
98 ╭────────────────────────────────────────────────────────────────────────┬─────╮
100 ├────────────────────────────────────────────────────────────────────────┼─────┤
101 │ 1. How often do you usually drive a car or other Every day │ 4667│
102 │motor vehicle? Several days a week │ 1274│
103 │ Once a week or less │ 361│
104 │ Only certain times a │ 130│
107 ╰────────────────────────────────────────────────────────────────────────┴─────╯
110 ╭──────────────────────────────────────────────────────────────────────────────╮
111 │ 1. How often do you usually drive a car or other motor vehicle? │
112 ├─────────┬──────────────────┬──────────────────┬────────────────────────┬─────┤
113 │ │ Several days a │ Once a week or │ Only certain times a │ │
114 │Every day│ week │ less │ year │Never│
115 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
116 │ Count │ Count │ Count │ Count │Count│
117 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
118 │ 4667│ 1274│ 361│ 130│ 540│
119 ╰─────────┴──────────────────┴──────────────────┴────────────────────────┴─────╯
131 AT_SETUP([CTABLES one scale variable])
132 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
133 AT_DATA([ctables.sps],
135 CTABLES /TABLE qnd1[COUNT, VALIDN, TOTALN, MEAN, STDDEV, MINIMUM, MAXIMUM].
136 CTABLES /TABLE BY qnd1.
137 CTABLES /TABLE BY BY qnd1.
139 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
141 ╭──────────────────────┬─────┬───────┬───────┬────┬────────────┬───────┬───────╮
142 │ │ │ │ │ │ Std │ │ │
143 │ │Count│Valid N│Total N│Mean│ Deviation │Minimum│Maximum│
144 ├──────────────────────┼─────┼───────┼───────┼────┼────────────┼───────┼───────┤
145 │D1. AGE: What is your │ 6999│ 6930│ 6999│ 48│ 19│ 16│ 86│
146 │age? │ │ │ │ │ │ │ │
147 ╰──────────────────────┴─────┴───────┴───────┴────┴────────────┴───────┴───────╯
150 ╭──────────────────────────╮
151 │D1. AGE: What is your age?│
152 ├──────────────────────────┤
154 ├──────────────────────────┤
156 ╰──────────────────────────╯
159 D1. AGE: What is your age?
168 AT_SETUP([CTABLES simple stacking])
169 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
170 AT_DATA([ctables.sps],
172 CTABLES /TABLE qn105ba + qn105bb + qn105bc + qn105bd BY qns3a [COLPCT PCT8.0].
174 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
176 ╭───────────────────────────────────────────────────────────────┬──────────────╮
183 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
184 │105b. How likely is it that drivers who have had Almost │ 10%│ 11%│
185 │too much to drink to drive safely will A. Get certain │ │ │
186 │stopped by the police? Very likely │ 21%│ 22%│
187 │ Somewhat │ 38%│ 42%│
189 │ Somewhat │ 21%│ 18%│
193 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
194 │105b. How likely is it that drivers who have had Almost │ 14%│ 18%│
195 │too much to drink to drive safely will B. Have an certain │ │ │
196 │accident? Very likely │ 36%│ 45%│
197 │ Somewhat │ 39%│ 32%│
203 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
204 │105b. How likely is it that drivers who have had Almost │ 18%│ 16%│
205 │too much to drink to drive safely will C. Be certain │ │ │
206 │convicted for drunk driving? Very likely │ 32%│ 28%│
207 │ Somewhat │ 27%│ 32%│
209 │ Somewhat │ 15%│ 15%│
213 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
214 │105b. How likely is it that drivers who have had Almost │ 16%│ 16%│
215 │too much to drink to drive safely will D. Be certain │ │ │
216 │arrested for drunk driving? Very likely │ 26%│ 27%│
217 │ Somewhat │ 32%│ 35%│
219 │ Somewhat │ 17%│ 15%│
223 ╰───────────────────────────────────────────────────────────────┴──────┴───────╯
227 AT_SETUP([CTABLES show or hide empty categories])
228 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
229 AT_DATA([ctables.sps],
231 IF (qn105ba = 2) qn105ba = 1.
232 IF (qns3a = 1) qns3a = 2.
233 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0].
234 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
235 /CATEGORIES VAR=qn105ba EMPTY=EXCLUDE.
236 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
237 /CATEGORIES VAR=qns3a EMPTY=EXCLUDE.
238 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
239 /CATEGORIES VAR=ALL EMPTY=EXCLUDE.
241 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
243 ╭──────────────────────────────────────────────────────────────┬───────────────╮
250 ├──────────────────────────────────────────────────────────────┼───────┼───────┤
251 │105b. How likely is it that drivers who have had Almost │ .│ 32%│
252 │too much to drink to drive safely will A. Get certain │ │ │
253 │stopped by the police? Very likely│ .│ 0%│
260 ╰──────────────────────────────────────────────────────────────┴───────┴───────╯
263 ╭──────────────────────────────────────────────────────────────┬───────────────╮
270 ├──────────────────────────────────────────────────────────────┼───────┼───────┤
271 │105b. How likely is it that drivers who have had Almost │ .│ 32%│
272 │too much to drink to drive safely will A. Get certain │ │ │
273 │stopped by the police? Somewhat │ .│ 40%│
279 ╰──────────────────────────────────────────────────────────────┴───────┴───────╯
282 ╭────────────────────────────────────────────────────────────────────┬─────────╮
289 ├────────────────────────────────────────────────────────────────────┼─────────┤
290 │105b. How likely is it that drivers who have had too Almost │ 32%│
291 │much to drink to drive safely will A. Get stopped by certain │ │
292 │the police? Very likely │ 0%│
299 ╰────────────────────────────────────────────────────────────────────┴─────────╯
302 ╭────────────────────────────────────────────────────────────────────┬─────────╮
309 ├────────────────────────────────────────────────────────────────────┼─────────┤
310 │105b. How likely is it that drivers who have had too Almost │ 32%│
311 │much to drink to drive safely will A. Get stopped by certain │ │
312 │the police? Somewhat │ 40%│
318 ╰────────────────────────────────────────────────────────────────────┴─────────╯
322 AT_SETUP([CTABLES simple nesting])
323 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
324 AT_DATA([ctables.sps],
326 CTABLES /TABLE (qn105ba + qn105bb + qn105bc + qn105bd) > qns3a [COUNT, TABLEPCT PCT8.0]
327 /CATEGORIES VARIABLES=qns3a TOTAL=YES.
328 CTABLES /TABLE qns3a > (qn105ba + qn105bb + qn105bc + qn105bd) [TABLEPCT PCT8.0]
329 /CATEGORIES VARIABLES=qns3a TOTAL=YES
330 /CLABELS ROW=OPPOSITE.
332 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
334 ╭─────────────────────────────────────────────────────────────────┬─────┬──────╮
337 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
338 │105b. How likely is it that drivers Almost S3a. Male │ 297│ 4%│
339 │who have had too much to drink to certain GENDER: Female│ 403│ 6%│
340 │drive safely will A. Get stopped by Total │ 700│ 10%│
341 │the police? ╶──────────────────────────┼─────┼──────┤
342 │ Very S3a. Male │ 660│ 10%│
343 │ likely GENDER: Female│ 842│ 12%│
345 │ ╶──────────────────────────┼─────┼──────┤
346 │ Somewhat S3a. Male │ 1174│ 17%│
347 │ likely GENDER: Female│ 1589│ 23%│
349 │ ╶──────────────────────────┼─────┼──────┤
350 │ Somewhat S3a. Male │ 640│ 9%│
351 │ unlikely GENDER: Female│ 667│ 10%│
353 │ ╶──────────────────────────┼─────┼──────┤
354 │ Very S3a. Male │ 311│ 5%│
355 │ unlikely GENDER: Female│ 298│ 4%│
357 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
358 │105b. How likely is it that drivers Almost S3a. Male │ 429│ 6%│
359 │who have had too much to drink to certain GENDER: Female│ 671│ 10%│
360 │drive safely will B. Have an accident? Total │ 1100│ 16%│
361 │ ╶──────────────────────────┼─────┼──────┤
362 │ Very S3a. Male │ 1104│ 16%│
363 │ likely GENDER: Female│ 1715│ 25%│
365 │ ╶──────────────────────────┼─────┼──────┤
366 │ Somewhat S3a. Male │ 1203│ 17%│
367 │ likely GENDER: Female│ 1214│ 18%│
369 │ ╶──────────────────────────┼─────┼──────┤
370 │ Somewhat S3a. Male │ 262│ 4%│
371 │ unlikely GENDER: Female│ 168│ 2%│
373 │ ╶──────────────────────────┼─────┼──────┤
374 │ Very S3a. Male │ 81│ 1%│
375 │ unlikely GENDER: Female│ 59│ 1%│
377 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
378 │105b. How likely is it that drivers Almost S3a. Male │ 539│ 8%│
379 │who have had too much to drink to certain GENDER: Female│ 610│ 9%│
380 │drive safely will C. Be convicted for Total │ 1149│ 17%│
381 │drunk driving? ╶──────────────────────────┼─────┼──────┤
382 │ Very S3a. Male │ 988│ 14%│
383 │ likely GENDER: Female│ 1049│ 15%│
385 │ ╶──────────────────────────┼─────┼──────┤
386 │ Somewhat S3a. Male │ 822│ 12%│
387 │ likely GENDER: Female│ 1210│ 18%│
389 │ ╶──────────────────────────┼─────┼──────┤
390 │ Somewhat S3a. Male │ 446│ 7%│
391 │ unlikely GENDER: Female│ 548│ 8%│
393 │ ╶──────────────────────────┼─────┼──────┤
394 │ Very S3a. Male │ 268│ 4%│
395 │ unlikely GENDER: Female│ 354│ 5%│
397 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
398 │105b. How likely is it that drivers Almost S3a. Male │ 498│ 7%│
399 │who have had too much to drink to certain GENDER: Female│ 603│ 9%│
400 │drive safely will D. Be arrested for Total │ 1101│ 16%│
401 │drunk driving? ╶──────────────────────────┼─────┼──────┤
402 │ Very S3a. Male │ 805│ 12%│
403 │ likely GENDER: Female│ 1029│ 15%│
405 │ ╶──────────────────────────┼─────┼──────┤
406 │ Somewhat S3a. Male │ 975│ 14%│
407 │ likely GENDER: Female│ 1332│ 19%│
409 │ ╶──────────────────────────┼─────┼──────┤
410 │ Somewhat S3a. Male │ 535│ 8%│
411 │ unlikely GENDER: Female│ 560│ 8%│
413 │ ╶──────────────────────────┼─────┼──────┤
414 │ Very S3a. Male │ 270│ 4%│
415 │ unlikely GENDER: Female│ 279│ 4%│
417 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
420 ╭─────────────────────────────────┬────────┬──────┬─────────┬─────────┬────────╮
421 │ │ Almost │ Very │ Somewhat│ Somewhat│ Very │
422 │ │ certain│likely│ likely │ unlikely│unlikely│
423 │ ├────────┼──────┼─────────┼─────────┼────────┤
425 │ │ Table %│ % │ Table % │ Table % │ Table %│
426 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
427 │S3a. Male 105b. How likely │ 4%│ 10%│ 17%│ 9%│ 5%│
428 │GENDER: is it that drivers│ │ │ │ │ │
429 │ who have had too │ │ │ │ │ │
430 │ much to drink to │ │ │ │ │ │
431 │ drive safely will │ │ │ │ │ │
432 │ A. Get stopped by │ │ │ │ │ │
433 │ the police? │ │ │ │ │ │
434 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
435 │ Female 105b. How likely │ 6%│ 12%│ 23%│ 10%│ 4%│
436 │ is it that drivers│ │ │ │ │ │
437 │ who have had too │ │ │ │ │ │
438 │ much to drink to │ │ │ │ │ │
439 │ drive safely will │ │ │ │ │ │
440 │ A. Get stopped by │ │ │ │ │ │
441 │ the police? │ │ │ │ │ │
442 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
443 │ Total 105b. How likely │ 10%│ 22%│ 40%│ 19%│ 9%│
444 │ is it that drivers│ │ │ │ │ │
445 │ who have had too │ │ │ │ │ │
446 │ much to drink to │ │ │ │ │ │
447 │ drive safely will │ │ │ │ │ │
448 │ A. Get stopped by │ │ │ │ │ │
449 │ the police? │ │ │ │ │ │
450 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
451 │S3a. Male 105b. How likely │ 6%│ 16%│ 17%│ 4%│ 1%│
452 │GENDER: is it that drivers│ │ │ │ │ │
453 │ who have had too │ │ │ │ │ │
454 │ much to drink to │ │ │ │ │ │
455 │ drive safely will │ │ │ │ │ │
456 │ B. Have an │ │ │ │ │ │
457 │ accident? │ │ │ │ │ │
458 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
459 │ Female 105b. How likely │ 10%│ 25%│ 18%│ 2%│ 1%│
460 │ is it that drivers│ │ │ │ │ │
461 │ who have had too │ │ │ │ │ │
462 │ much to drink to │ │ │ │ │ │
463 │ drive safely will │ │ │ │ │ │
464 │ B. Have an │ │ │ │ │ │
465 │ accident? │ │ │ │ │ │
466 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
467 │ Total 105b. How likely │ 16%│ 41%│ 35%│ 6%│ 2%│
468 │ is it that drivers│ │ │ │ │ │
469 │ who have had too │ │ │ │ │ │
470 │ much to drink to │ │ │ │ │ │
471 │ drive safely will │ │ │ │ │ │
472 │ B. Have an │ │ │ │ │ │
473 │ accident? │ │ │ │ │ │
474 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
475 │S3a. Male 105b. How likely │ 8%│ 14%│ 12%│ 7%│ 4%│
476 │GENDER: is it that drivers│ │ │ │ │ │
477 │ who have had too │ │ │ │ │ │
478 │ much to drink to │ │ │ │ │ │
479 │ drive safely will │ │ │ │ │ │
480 │ C. Be convicted │ │ │ │ │ │
481 │ for drunk driving?│ │ │ │ │ │
482 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
483 │ Female 105b. How likely │ 9%│ 15%│ 18%│ 8%│ 5%│
484 │ is it that drivers│ │ │ │ │ │
485 │ who have had too │ │ │ │ │ │
486 │ much to drink to │ │ │ │ │ │
487 │ drive safely will │ │ │ │ │ │
488 │ C. Be convicted │ │ │ │ │ │
489 │ for drunk driving?│ │ │ │ │ │
490 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
491 │ Total 105b. How likely │ 17%│ 30%│ 30%│ 15%│ 9%│
492 │ is it that drivers│ │ │ │ │ │
493 │ who have had too │ │ │ │ │ │
494 │ much to drink to │ │ │ │ │ │
495 │ drive safely will │ │ │ │ │ │
496 │ C. Be convicted │ │ │ │ │ │
497 │ for drunk driving?│ │ │ │ │ │
498 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
499 │S3a. Male 105b. How likely │ 7%│ 12%│ 14%│ 8%│ 4%│
500 │GENDER: is it that drivers│ │ │ │ │ │
501 │ who have had too │ │ │ │ │ │
502 │ much to drink to │ │ │ │ │ │
503 │ drive safely will │ │ │ │ │ │
504 │ D. Be arrested for│ │ │ │ │ │
505 │ drunk driving? │ │ │ │ │ │
506 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
507 │ Female 105b. How likely │ 9%│ 15%│ 19%│ 8%│ 4%│
508 │ is it that drivers│ │ │ │ │ │
509 │ who have had too │ │ │ │ │ │
510 │ much to drink to │ │ │ │ │ │
511 │ drive safely will │ │ │ │ │ │
512 │ D. Be arrested for│ │ │ │ │ │
513 │ drunk driving? │ │ │ │ │ │
514 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
515 │ Total 105b. How likely │ 16%│ 27%│ 34%│ 16%│ 8%│
516 │ is it that drivers│ │ │ │ │ │
517 │ who have had too │ │ │ │ │ │
518 │ much to drink to │ │ │ │ │ │
519 │ drive safely will │ │ │ │ │ │
520 │ D. Be arrested for│ │ │ │ │ │
521 │ drunk driving? │ │ │ │ │ │
522 ╰─────────────────────────────────┴────────┴──────┴─────────┴─────────┴────────╯
526 AT_SETUP([CTABLES nesting and scale variables])
527 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
528 AT_DATA([ctables.sps],
530 CTABLES /TABLE=qnd1 > qn1 BY qns3a.
531 CTABLES /TABLE=qnd1 [MINIMUM, MAXIMUM, MEAN] > qns3a > (qn26 + qn27).
532 CTABLES /TABLE=qnsa1 > qn105ba [COLPCT] BY qns1
533 /CATEGORIES VAR=qnsa1 EMPTY=EXCLUDE.
534 CTABLES /TABLE=AgeGroup > qn20 [MEAN F8.1, STDDEV F8.1].
536 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
538 ╭─────────────────────────────────────────────────────────────────┬────────────╮
544 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
545 │D1. AGE: What 1. How often do you usually drive Every day │ 46│ 46│
546 │is your age? a car or other motor vehicle? Several days a │ 51│ 59│
548 │ Once a week or │ 44│ 54│
550 │ Only certain │ 34│ 41│
553 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
556 ╭─────────────────────────────────────────────────────────┬───────┬───────┬────╮
557 │ │Minimum│Maximum│Mean│
558 ├─────────────────────────────────────────────────────────┼───────┼───────┼────┤
559 │D1. AGE: S3a. Male 26. During the last 12 Yes│ 16│ 86│ 42│
560 │What is GENDER: months, has there been a │ │ │ │
561 │your time when you felt you │ │ │ │
562 │age? should cut down on your No │ 16│ 86│ 46│
564 │ ╶───────────────────────────────────────┼───────┼───────┼────┤
565 │ Female 26. During the last 12 Yes│ 16│ 86│ 43│
566 │ months, has there been a │ │ │ │
567 │ time when you felt you │ │ │ │
568 │ should cut down on your No │ 16│ 86│ 48│
570 ├─────────────────────────────────────────────────────────┼───────┼───────┼────┤
571 │D1. AGE: S3a. Male 27. During the last 12 Yes│ 16│ 86│ 38│
572 │What is GENDER: months, has there been a │ │ │ │
573 │your time when people criticized No │ 16│ 86│ 46│
574 │age? your drinking? │ │ │ │
575 │ ╶───────────────────────────────────────┼───────┼───────┼────┤
576 │ Female 27. During the last 12 Yes│ 17│ 69│ 37│
577 │ months, has there been a │ │ │ │
578 │ time when people criticized No │ 16│ 86│ 48│
579 │ your drinking? │ │ │ │
580 ╰─────────────────────────────────────────────────────────┴───────┴───────┴────╯
583 ╭─────────────────────────────┬────────────────────────────────────────────────╮
584 │ │S1. Including yourself, how many members of this│
585 │ │ household are age 16 or older? │
586 │ ├──────┬──────┬──────┬──────┬──────┬──────┬──────┤
587 │ │ │ │ │ │ │ │ 6 or │
588 │ │ None │ 1 │ 2 │ 3 │ 4 │ 5 │ more │
589 │ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
590 │ │Column│Column│Column│Column│Column│Column│Column│
591 │ │ % │ % │ % │ % │ % │ % │ % │
592 ├─────────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
593 │Sa1. RDD 105b. Almost │ .│ 9.5%│ 8.2%│ 12.4%│ 9.9%│ 20.0%│ 23.8%│
594 │SAMPLE How certain │ │ │ │ │ │ │ │
595 │SOURCE: likely │ │ │ │ │ │ │ │
596 │ is it Very │ .│ 24.9%│ 18.5%│ 24.0%│ 26.6%│ 25.5%│ 33.3%│
597 │ that likely │ │ │ │ │ │ │ │
598 │ drivers │ │ │ │ │ │ │ │
599 │ who have │ │ │ │ │ │ │ │
600 │ had too Somewhat│ .│ 38.3%│ 41.9%│ 38.6%│ 37.5%│ 36.4%│ 23.8%│
601 │ much to likely │ │ │ │ │ │ │ │
602 │ drink to │ │ │ │ │ │ │ │
603 │ drive │ │ │ │ │ │ │ │
604 │ safely Somewhat│ .│ 18.1%│ 21.7%│ 16.8%│ 16.7%│ 10.9%│ 9.5%│
605 │ will A. unlikely│ │ │ │ │ │ │ │
606 │ Get │ │ │ │ │ │ │ │
607 │ stopped Very │ .│ 9.2%│ 9.7%│ 8.2%│ 9.4%│ 7.3%│ 9.5%│
608 │ by the unlikely│ │ │ │ │ │ │ │
609 │ police? │ │ │ │ │ │ │ │
610 ╰─────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
613 ╭──────────────────────────────────────────────────────────────┬────┬──────────╮
616 ├──────────────────────────────────────────────────────────────┼────┼──────────┤
617 │Age 16 to 25 20. On how many of the thirty days in this │ 5.2│ 6.0│
618 │group typical month did you have one or more │ │ │
619 │ alcoholic beverages to drink? │ │ │
620 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
621 │ 26 to 35 20. On how many of the thirty days in this │ 4.7│ 5.9│
622 │ typical month did you have one or more │ │ │
623 │ alcoholic beverages to drink? │ │ │
624 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
625 │ 36 to 45 20. On how many of the thirty days in this │ 5.5│ 6.8│
626 │ typical month did you have one or more │ │ │
627 │ alcoholic beverages to drink? │ │ │
628 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
629 │ 46 to 55 20. On how many of the thirty days in this │ 5.8│ 7.7│
630 │ typical month did you have one or more │ │ │
631 │ alcoholic beverages to drink? │ │ │
632 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
633 │ 56 to 65 20. On how many of the thirty days in this │ 6.3│ 8.2│
634 │ typical month did you have one or more │ │ │
635 │ alcoholic beverages to drink? │ │ │
636 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
637 │ 66 or 20. On how many of the thirty days in this │ 7.1│ 9.2│
638 │ older typical month did you have one or more │ │ │
639 │ alcoholic beverages to drink? │ │ │
640 ╰──────────────────────────────────────────────────────────────┴────┴──────────╯
645 AT_SETUP([CTABLES SLABELS])
646 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
647 AT_DATA([ctables.sps],
649 CTABLES /TABLE qn1 [COUNT COLPCT].
650 CTABLES /TABLE qn1 [COUNT COLPCT]
651 /SLABELS POSITION=ROW.
652 CTABLES /TABLE qn1 [COUNT COLPCT]
653 /SLABELS POSITION=ROW VISIBLE=NO.
655 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
657 ╭────────────────────────────────────────────────────────────────┬─────┬───────╮
660 ├────────────────────────────────────────────────────────────────┼─────┼───────┤
661 │ 1. How often do you usually drive a car or Every day │ 4667│ 66.9%│
662 │other motor vehicle? Several days a week│ 1274│ 18.3%│
663 │ Once a week or less│ 361│ 5.2%│
664 │ Only certain times │ 130│ 1.9%│
667 ╰────────────────────────────────────────────────────────────────┴─────┴───────╯
670 ╭────────────────────────────────────────────────────────────────────────┬─────╮
671 │ 1. How often do you usually drive a car or Every day Count │ 4667│
672 │other motor vehicle? Column │66.9%│
674 │ ╶───────────────────────────┼─────┤
675 │ Several days a week Count │ 1274│
678 │ ╶───────────────────────────┼─────┤
679 │ Once a week or less Count │ 361│
682 │ ╶───────────────────────────┼─────┤
683 │ Only certain times Count │ 130│
684 │ a year Column │ 1.9%│
686 │ ╶───────────────────────────┼─────┤
690 ╰────────────────────────────────────────────────────────────────────────┴─────╯
693 ╭────────────────────────────────────────────────────────────────────────┬─────╮
694 │ 1. How often do you usually drive a car or other Every day │ 4667│
695 │motor vehicle? │66.9%│
696 │ Several days a week │ 1274│
698 │ Once a week or less │ 361│
700 │ Only certain times a │ 130│
704 ╰────────────────────────────────────────────────────────────────────────┴─────╯
708 AT_SETUP([CTABLES simple totals])
709 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
710 AT_DATA([ctables.sps],
713 /CATEGORIES VARIABLES=qn17 TOTAL=YES LABEL='Number responding'.
714 DESCRIPTIVES qn18/STATISTICS=MEAN.
715 CTABLES /TABLE=region > qn18 [MEAN, COUNT, VALIDN, TOTALN]
716 /CATEGORIES VARIABLES=region TOTAL=YES LABEL='All regions'.
718 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
720 ╭────────────────────────────────────────────────────────────────────────┬─────╮
722 ├────────────────────────────────────────────────────────────────────────┼─────┤
723 │17. When you drink alcoholic beverages, which ONE of OR, something else│ 2│
724 │the following beverages do you drink MOST OFTEN? Beer │ 1073│
727 │ Wine coolers │ 137│
728 │ Hard liquor or │ 888│
730 │ Flavored malt │ 83│
732 │ Number responding │ 4221│
733 ╰────────────────────────────────────────────────────────────────────────┴─────╯
735 Descriptive Statistics
736 ╭────────────────────────────────────────────────────────────────────┬────┬────╮
738 ├────────────────────────────────────────────────────────────────────┼────┼────┤
739 │18. When you drink ANSWERFROM(QN17R1), about how many │4218│4.62│
740 │ANSWERFROM(QN17R2) do you usually drink per sitting? │ │ │
741 │Valid N (listwise) │6999│ │
742 │Missing N (listwise) │2781│ │
743 ╰────────────────────────────────────────────────────────────────────┴────┴────╯
746 ╭──────────────────────────────────────────────────────┬────┬─────┬──────┬─────╮
748 │ │Mean│Count│ N │ N │
749 ├──────────────────────────────────────────────────────┼────┼─────┼──────┼─────┤
750 │Region NE 18. When you drink ANSWERFROM(QN17R1),│4.36│ 1409│ 949│ 1409│
751 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
752 │ you usually drink per sitting? │ │ │ │ │
753 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
754 │ MW 18. When you drink ANSWERFROM(QN17R1),│4.67│ 1654│ 1027│ 1654│
755 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
756 │ you usually drink per sitting? │ │ │ │ │
757 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
758 │ S 18. When you drink ANSWERFROM(QN17R1),│4.71│ 2390│ 1287│ 2390│
759 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
760 │ you usually drink per sitting? │ │ │ │ │
761 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
762 │ W 18. When you drink ANSWERFROM(QN17R1),│4.69│ 1546│ 955│ 1546│
763 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
764 │ you usually drink per sitting? │ │ │ │ │
765 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
766 │ All 18. When you drink ANSWERFROM(QN17R1),│4.62│ 6999│ 4218│ 6999│
767 │ regions about how many ANSWERFROM(QN17R2) do │ │ │ │ │
768 │ you usually drink per sitting? │ │ │ │ │
769 ╰──────────────────────────────────────────────────────┴────┴─────┴──────┴─────╯
773 AT_SETUP([CTABLES subtotals])
774 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
775 AT_DATA([ctables.sps],
777 CTABLES /TABLE=qn105ba BY qns1
778 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, SUBTOTAL].
779 CTABLES /TABLE=qn105ba [COLPCT] BY qns1
780 /CATEGORIES VARIABLES=qn105ba [1, 2, 3, SUBTOTAL, 4, 5, SUBTOTAL].
781 CTABLES /TABLE=qn105ba BY qns1
782 /CATEGORIES VARIABLES=qn105ba [1, 2, 3, SUBTOTAL, 4, 5, SUBTOTAL]
783 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, SUBTOTAL].
785 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
787 ╭─────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────╮
788 │ │ S1. Including yourself, how many members of this household │
789 │ │ are age 16 or older? │
790 │ ├───────┬───────┬─────────┬───────┬────────┬──────┬──────────┤
791 │ │ 1 │ 2 │ Subtotal│ 3 │ 4 │ 5 │ Subtotal │
792 │ ├───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
793 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
794 ├─────────────────────────────────────────────────────────┼───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
795 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 62│ 19│ 11│ 92│
796 │had too much to drink to drive safely will A. certain │ │ │ │ │ │ │ │
797 │Get stopped by the police? Very likely│ 384│ 552│ 936│ 120│ 51│ 14│ 185│
798 │ Somewhat │ 590│ 1249│ 1839│ 193│ 72│ 20│ 285│
799 │ likely │ │ │ │ │ │ │ │
800 │ Somewhat │ 278│ 647│ 925│ 84│ 32│ 6│ 122│
801 │ unlikely │ │ │ │ │ │ │ │
802 │ Very │ 141│ 290│ 431│ 41│ 18│ 4│ 63│
803 │ unlikely │ │ │ │ │ │ │ │
804 ╰─────────────────────────────────────────────────────────┴───────┴───────┴─────────┴───────┴────────┴──────┴──────────╯
807 ╭────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────╮
808 │ │ S1. Including yourself, how many members of this household │
809 │ │ are age 16 or older? │
810 │ ├────────┬────────┬────────┬────────┬───────┬────────┬────────┤
811 │ │ │ │ │ │ │ │ 6 or │
812 │ │ None │ 1 │ 2 │ 3 │ 4 │ 5 │ more │
813 │ ├────────┼────────┼────────┼────────┼───────┼────────┼────────┤
814 │ │ │ │ │ │ Column│ │ │
815 │ │Column %│Column %│Column %│Column %│ % │Column %│Column %│
816 ├────────────────────────────────────────────────────────┼────────┼────────┼────────┼────────┼───────┼────────┼────────┤
817 │105b. How likely is it that drivers who have Almost │ .│ 9.5%│ 8.2%│ 12.4%│ 9.9%│ 20.0%│ 23.8%│
818 │had too much to drink to drive safely will certain │ │ │ │ │ │ │ │
819 │A. Get stopped by the police? Very likely│ .│ 24.9%│ 18.5%│ 24.0%│ 26.6%│ 25.5%│ 33.3%│
820 │ Somewhat │ .│ 38.3%│ 41.9%│ 38.6%│ 37.5%│ 36.4%│ 23.8%│
821 │ likely │ │ │ │ │ │ │ │
822 │ Subtotal │ │ 72.8%│ 68.6%│ 75.0%│ 74.0%│ 81.8%│ 81.0%│
823 │ Somewhat │ .│ 18.1%│ 21.7%│ 16.8%│ 16.7%│ 10.9%│ 9.5%│
824 │ unlikely │ │ │ │ │ │ │ │
825 │ Very │ .│ 9.2%│ 9.7%│ 8.2%│ 9.4%│ 7.3%│ 9.5%│
826 │ unlikely │ │ │ │ │ │ │ │
827 │ Subtotal │ │ 27.2%│ 31.4%│ 25.0%│ 26.0%│ 18.2%│ 19.0%│
828 ╰────────────────────────────────────────────────────────┴────────┴────────┴────────┴────────┴───────┴────────┴────────╯
831 ╭─────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────╮
832 │ │ S1. Including yourself, how many members of this household │
833 │ │ are age 16 or older? │
834 │ ├───────┬───────┬─────────┬───────┬────────┬──────┬──────────┤
835 │ │ 1 │ 2 │ Subtotal│ 3 │ 4 │ 5 │ Subtotal │
836 │ ├───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
837 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
838 ├─────────────────────────────────────────────────────────┼───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
839 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 62│ 19│ 11│ 92│
840 │had too much to drink to drive safely will A. certain │ │ │ │ │ │ │ │
841 │Get stopped by the police? Very likely│ 384│ 552│ 936│ 120│ 51│ 14│ 185│
842 │ Somewhat │ 590│ 1249│ 1839│ 193│ 72│ 20│ 285│
843 │ likely │ │ │ │ │ │ │ │
844 │ Subtotal │ 1121│ 2047│ 3168│ 375│ 142│ 45│ 562│
845 │ Somewhat │ 278│ 647│ 925│ 84│ 32│ 6│ 122│
846 │ unlikely │ │ │ │ │ │ │ │
847 │ Very │ 141│ 290│ 431│ 41│ 18│ 4│ 63│
848 │ unlikely │ │ │ │ │ │ │ │
849 │ Subtotal │ 419│ 937│ 1356│ 125│ 50│ 10│ 185│
850 ╰─────────────────────────────────────────────────────────┴───────┴───────┴─────────┴───────┴────────┴──────┴──────────╯
854 AT_SETUP([CTABLES PCOMPUTE])
855 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
856 AT_DATA([ctables.sps],
859 /PCOMPUTE &x=EXPR([3] + [4])
860 /PCOMPUTE &y=EXPR([4] + [5])
861 /PPROPERTIES &x LABEL='3+4' HIDESOURCECATS=YES
862 /PPROPERTIES &y LABEL='4+5'
863 /TABLE=qn105ba BY qns1
864 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, &x, &y, SUBTOTAL]
866 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
868 ╭─────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────╮
869 │ │ S1. Including yourself, how many members of this household │
870 │ │ are age 16 or older? │
871 │ ├───────┬───────┬─────────┬───────┬────────┬──────┬──────────┤
872 │ │ 1 │ 2 │ Subtotal│ 5 │ 3+4 │ 4+5 │ Subtotal │
873 │ ├───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
874 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
875 ├─────────────────────────────────────────────────────────┼───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
876 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 11│ 81│ 30│ 92│
877 │had too much to drink to drive safely will A. certain │ │ │ │ │ │ │ │
878 │Get stopped by the police? Very likely│ 384│ 552│ 936│ 14│ 171│ 65│ 185│
879 │ Somewhat │ 590│ 1249│ 1839│ 20│ 265│ 92│ 285│
880 │ likely │ │ │ │ │ │ │ │
881 │ Somewhat │ 278│ 647│ 925│ 6│ 116│ 38│ 122│
882 │ unlikely │ │ │ │ │ │ │ │
883 │ Very │ 141│ 290│ 431│ 4│ 59│ 22│ 63│
884 │ unlikely │ │ │ │ │ │ │ │
885 ╰─────────────────────────────────────────────────────────┴───────┴───────┴─────────┴───────┴────────┴──────┴──────────╯
889 AT_SETUP([CTABLES CLABELS])
890 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
891 AT_DATA([ctables.sps],
893 CTABLES /TABLE AgeGroup BY qns3a /CLABELS ROWLABELS=OPPOSITE.
894 CTABLES /TABLE AgeGroup BY qns3a /CLABELS COLLABELS=OPPOSITE.
896 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
898 ╭───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
900 │ ├──────────────────────────────────────────────────────┬───────────────────────────────────────────────────────┤
902 │ ├─────────┬───────┬──────┬──────┬──────┬───────┬───────┼──────────┬──────┬───────┬──────┬──────┬──────┬────────┤
903 │ │ 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 │
904 │ │ younger │ 25 │ 35 │ 45 │ 55 │ 65 │ older │ younger │ 25 │ 35 │ 45 │ 55 │ 65 │ older │
905 │ ├─────────┼───────┼──────┼──────┼──────┼───────┼───────┼──────────┼──────┼───────┼──────┼──────┼──────┼────────┤
906 │ │ Count │ Count │ Count│ Count│ Count│ Count │ Count │ Count │ Count│ Count │ Count│ Count│ Count│ Count │
907 ├───────┼─────────┼───────┼──────┼──────┼──────┼───────┼───────┼──────────┼──────┼───────┼──────┼──────┼──────┼────────┤
908 │Age │ 0│ 594│ 476│ 489│ 526│ 516│ 531│ 0│ 505│ 491│ 548│ 649│ 731│ 943│
909 │group │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
910 ╰───────┴─────────┴───────┴──────┴──────┴──────┴───────┴───────┴──────────┴──────┴───────┴──────┴──────┴──────┴────────╯
913 ╭──────────────────────────────┬────────────╮
917 ├──────────────────────────────┼────────────┤
918 │Age group 15 or younger Male │ 0│
920 │ ╶────────────────────┼────────────┤
921 │ 16 to 25 Male │ 594│
923 │ ╶────────────────────┼────────────┤
924 │ 26 to 35 Male │ 476│
926 │ ╶────────────────────┼────────────┤
927 │ 36 to 45 Male │ 489│
929 │ ╶────────────────────┼────────────┤
930 │ 46 to 55 Male │ 526│
932 │ ╶────────────────────┼────────────┤
933 │ 56 to 65 Male │ 516│
935 │ ╶────────────────────┼────────────┤
936 │ 66 or older Male │ 531│
938 ╰──────────────────────────────┴────────────╯
942 AT_SETUP([CTABLES missing values])
943 AT_DATA([ctables.sps],
944 [[DATA LIST LIST NOTABLE/x y.
983 MISSING VALUES x (1, 2) y (2, 3).
984 VARIABLE LEVEL ALL (NOMINAL).
986 CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
987 /CATEGORIES VARIABLES=ALL TOTAL=YES.
988 CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
989 /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE.
990 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
991 /CATEGORIES VARIABLES=ALL TOTAL=YES
992 /SLABELS POSITION=ROW.
993 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
994 /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE
995 /SLABELS POSITION=ROW.
996 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
997 /CATEGORIES VARIABLES=x [1, 2, 3, 4] TOTAL=YES
998 /CATEGORIES VARIABLES=y [1, 3, 4, 5] TOTAL=YES
999 /SLABELS POSITION=ROW.
1001 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
1003 ╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
1004 │ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
1005 ├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
1006 │x 3.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
1007 │ 4.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
1008 │ 5.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
1009 │ Total│ 18│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
1010 ╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
1011 dnl Note that Column Total N % doesn't add up to 100 because missing
1012 dnl values are included in the total but not shown as a category and this
1013 dnl is expected behavior.
1016 ╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
1017 │ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
1018 ├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
1019 │x 1.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
1020 │ 2.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
1021 │ 3.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
1022 │ 4.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
1023 │ 5.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
1024 │ Total│ 30│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
1025 ╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
1026 dnl Note that Column Total N % doesn't add up to 100 because system-missing
1027 dnl values are included in the total but not shown as a category and this
1028 dnl is expected behavior.
1031 ╭────────────────────────┬───────────────────────────╮
1033 │ ├──────┬──────┬──────┬──────┤
1034 │ │ 1.00 │ 4.00 │ 5.00 │ Total│
1035 ├────────────────────────┼──────┼──────┼──────┼──────┤
1036 │x 3.00 Count │ 1│ 1│ 1│ 3│
1037 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
1038 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
1039 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ .│
1040 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
1041 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
1042 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
1043 │ Valid N │ │ │ │ 3│
1044 │ Total N │ │ │ │ 6│
1045 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
1046 │ 4.00 Count │ 1│ 1│ 1│ 3│
1047 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
1048 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
1049 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ .│
1050 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
1051 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
1052 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
1053 │ Valid N │ │ │ │ 3│
1054 │ Total N │ │ │ │ 6│
1055 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
1056 │ 5.00 Count │ 1│ 1│ 1│ 3│
1057 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
1058 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
1059 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ .│
1060 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
1061 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
1062 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
1063 │ Valid N │ │ │ │ 3│
1064 │ Total N │ │ │ │ 6│
1065 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
1066 │ Total Count │ 3│ 3│ 3│ 9│
1067 │ Column % │100.0%│100.0%│100.0%│ .│
1068 │ Column Valid N %│100.0%│100.0%│100.0%│ .│
1069 │ Column Total N %│100.0%│100.0%│100.0%│ .│
1070 │ Row % │ .│ .│ .│ .│
1071 │ Row Valid N % │ .│ .│ .│ .│
1072 │ Row Total N % │ .│ .│ .│ .│
1073 │ Valid N │ 3│ 3│ 3│ 9│
1074 │ Total N │ 6│ 6│ 6│ 36│
1075 ╰────────────────────────┴──────┴──────┴──────┴──────╯
1078 ╭────────────────────────┬─────────────────────────────────────────╮
1080 │ ├──────┬──────┬──────┬──────┬──────┬──────┤
1081 │ │ 1.00 │ 2.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
1082 ├────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
1083 │x 1.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
1084 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1085 │ Column Valid N %│ .0%│ .│ .│ .0%│ .0%│ .│
1086 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
1087 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
1088 │ Row Valid N % │ .│ .│ .│ .│ .│ .│
1089 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1090 │ Valid N │ │ │ │ │ │ 0│
1091 │ Total N │ │ │ │ │ │ 6│
1092 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
1093 │ 2.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
1094 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1095 │ Column Valid N %│ .0%│ .│ .│ .0%│ .0%│ .│
1096 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
1097 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
1098 │ Row Valid N % │ .│ .│ .│ .│ .│ .│
1099 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1100 │ Valid N │ │ │ │ │ │ 0│
1101 │ Total N │ │ │ │ │ │ 6│
1102 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
1103 │ 3.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
1104 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1105 │ Column Valid N %│ 33.3%│ .│ .│ 33.3%│ 33.3%│ .│
1106 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
1107 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
1108 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
1109 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1110 │ Valid N │ │ │ │ │ │ 3│
1111 │ Total N │ │ │ │ │ │ 6│
1112 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
1113 │ 4.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
1114 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1115 │ Column Valid N %│ 33.3%│ .│ .│ 33.3%│ 33.3%│ .│
1116 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
1117 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
1118 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
1119 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1120 │ Valid N │ │ │ │ │ │ 3│
1121 │ Total N │ │ │ │ │ │ 6│
1122 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
1123 │ 5.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
1124 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1125 │ Column Valid N %│ 33.3%│ .│ .│ 33.3%│ 33.3%│ .│
1126 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
1127 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
1128 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
1129 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1130 │ Valid N │ │ │ │ │ │ 3│
1131 │ Total N │ │ │ │ │ │ 6│
1132 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
1133 │ Total Count │ 5│ 5│ 5│ 5│ 5│ 25│
1134 │ Column % │100.0%│100.0%│100.0%│100.0%│100.0%│ .│
1135 │ Column Valid N %│100.0%│ .│ .│100.0%│100.0%│ .│
1136 │ Column Total N %│100.0%│100.0%│100.0%│100.0%│100.0%│ .│
1137 │ Row % │ .│ .│ .│ .│ .│ .│
1138 │ Row Valid N % │ .│ .│ .│ .│ .│ .│
1139 │ Row Total N % │ .│ .│ .│ .│ .│ .│
1140 │ Valid N │ 3│ 0│ 0│ 3│ 3│ 9│
1141 │ Total N │ 6│ 6│ 6│ 6│ 6│ 36│
1142 ╰────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────╯
1145 ╭────────────────────────┬──────────────────────────────────╮
1147 │ ├──────┬──────┬──────┬──────┬──────┤
1148 │ │ 1.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
1149 ├────────────────────────┼──────┼──────┼──────┼──────┼──────┤
1150 │x 1.00 Count │ 1│ 1│ 1│ 1│ 4│
1151 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
1152 │ Column Valid N %│ .0%│ .│ .0%│ .0%│ .│
1153 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1154 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
1155 │ Row Valid N % │ .│ .│ .│ .│ .│
1156 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1157 │ Valid N │ │ │ │ │ 0│
1158 │ Total N │ │ │ │ │ 6│
1159 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
1160 │ 2.00 Count │ 1│ 1│ 1│ 1│ 4│
1161 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
1162 │ Column Valid N %│ .0%│ .│ .0%│ .0%│ .│
1163 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1164 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
1165 │ Row Valid N % │ .│ .│ .│ .│ .│
1166 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1167 │ Valid N │ │ │ │ │ 0│
1168 │ Total N │ │ │ │ │ 6│
1169 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
1170 │ 3.00 Count │ 1│ 1│ 1│ 1│ 4│
1171 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
1172 │ Column Valid N %│ 50.0%│ .│ 50.0%│ 50.0%│ .│
1173 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1174 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
1175 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
1176 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1177 │ Valid N │ │ │ │ │ 3│
1178 │ Total N │ │ │ │ │ 6│
1179 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
1180 │ 4.00 Count │ 1│ 1│ 1│ 1│ 4│
1181 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
1182 │ Column Valid N %│ 50.0%│ .│ 50.0%│ 50.0%│ .│
1183 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
1184 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
1185 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
1186 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
1187 │ Valid N │ │ │ │ │ 3│
1188 │ Total N │ │ │ │ │ 6│
1189 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
1190 │ Total Count │ 4│ 4│ 4│ 4│ 16│
1191 │ Column % │100.0%│100.0%│100.0%│100.0%│ .│
1192 │ Column Valid N %│100.0%│ .│100.0%│100.0%│ .│
1193 │ Column Total N %│100.0%│100.0%│100.0%│100.0%│ .│
1194 │ Row % │ .│ .│ .│ .│ .│
1195 │ Row Valid N % │ .│ .│ .│ .│ .│
1196 │ Row Total N % │ .│ .│ .│ .│ .│
1197 │ Valid N │ 2│ 0│ 2│ 2│ 6│
1198 │ Total N │ 5│ 5│ 5│ 5│ 30│
1199 ╰────────────────────────┴──────┴──────┴──────┴──────┴──────╯
1203 AT_SETUP([CTABLES SMISSING=LISTWISE])
1204 AT_KEYWORDS([SMISSING LISTWISE])
1205 AT_DATA([ctables.sps],
1206 [[DATA LIST LIST NOTABLE/x y z.
1214 VARIABLE LEVEL x (NOMINAL).
1216 CTABLES /TABLE (y + z) > x.
1217 CTABLES /SMISSING LISTWISE /TABLE (y + z) > x.
1219 * The following doesn't come out as listwise because the tables are
1220 separate, not linked by an > operator.
1221 CTABLES /SMISSING LISTWISE /TABLE (y > x) + (z > x).
1223 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl