X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fstats%2Fctables.at;h=725731c7db127848734b8ed50ccb4efcb4654af2;hb=d98583b9425b8a053dc21b539203406bac74adc5;hp=67d6db4b263b97df81f8e819996b9b1a43deee8e;hpb=c4bc3574d974d3aaf4d291097c995a31515a308a;p=pspp diff --git a/tests/language/stats/ctables.at b/tests/language/stats/ctables.at index 67d6db4b26..725731c7db 100644 --- a/tests/language/stats/ctables.at +++ b/tests/language/stats/ctables.at @@ -1,11 +1,42 @@ AT_BANNER([CTABLES]) -dnl Features not yet tested: -dnl - Summary functions: -dnl * WEIGHT and adjustment weights. -dnl * details of missing value handling in summaries. -dnl -dnl Not for v1: +dnl Known bugs: +dnl TOTAL interaction with PCOMPUTE, e.g. the following +dnl CTABLES +dnl /PCOMPUTE &all_drivers=EXPR([1 THRU 2] + [3 THRU 4]) +dnl /PPROPERTIES &all_drivers LABEL='All Drivers' +dnl /PCOMPUTE &pct_not_drivers=EXPR([5] / ([1 THRU 2] + [3 THRU 4] + [5]) * 100) +dnl /PPROPERTIES &pct_not_drivers LABEL='% Not Drivers' FORMAT=COUNT PCT40.1 +dnl /TABLE=qn1 BY qns3a +dnl /CATEGORIES VARIABLES=qns3a TOTAL=YES +dnl /CATEGORIES VARIABLES=qn1 [1 THRU 2, SUBTOTAL='Frequent Drivers', +dnl 3 THRU 4, SUBTOTAL='Infrequent Drivers', +dnl &all_drivers, 5, &pct_not_drivers, +dnl MISSING, SUBTOTAL='Not Drivers or Missing']. +dnl yields gaps in the Total column: +dnl ╭─────────────────────────────────────────────────────────────────────────┬──────────────────╮ +dnl │ │ S3a. GENDER: │ +dnl │ ├─────┬──────┬─────┤ +dnl │ │ Male│Female│Total│ +dnl │ ├─────┼──────┼─────┤ +dnl │ │Count│ Count│Count│ +dnl ├─────────────────────────────────────────────────────────────────────────┼─────┼──────┼─────┤ +dnl │ 1. How often do you usually drive a car or other Every day │ 2305│ 2362│ 4667│ +dnl │motor vehicle? Several days a week │ 440│ 834│ 1274│ +dnl │ Frequent Drivers │ 2745│ 3196│ │ +dnl │ Once a week or less │ 125│ 236│ 361│ +dnl │ Only certain times a │ 58│ 72│ 130│ +dnl │ year │ │ │ │ +dnl │ Infrequent Drivers │ 183│ 308│ │ +dnl │ All Drivers │ 2928│ 3504│ │ +dnl │ Never │ 192│ 348│ 540│ +dnl │ % Not Drivers │ 6.2%│ 9.0%│ │ +dnl │ Don't know │ 3│ 5│ 8│ +dnl │ Refused │ 9│ 10│ 19│ +dnl │ Not Drivers or │ 204│ 363│ │ +dnl │ Missing │ │ │ │ +dnl ╰─────────────────────────────────────────────────────────────────────────┴─────┴──────┴─────╯ +dnl Features not yet implemented: dnl - Multiple response sets dnl - MRSETS subcommand. dnl - CATEGORIES: Special case for explicit category specifications and multiple dichotomy sets. @@ -14,8 +45,6 @@ dnl - COMPARETEST dnl - Summary functions: dnl * .LCL and .UCL suffixes. dnl * .SE suffixes. -dnl - Summary functions: -dnl * )CILEVEL in summary label specification dnl - CATEGORIES: dnl * Data-dependent sorting. @@ -533,6 +562,17 @@ CTABLES /PCOMPUTE &x=EXPR(**). CTABLES /TABLE. CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT]. + +CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=PTILE(qn1, 50). + +CTABLES /TABLE $mrset. + +CTABLES /TABLE qn113 /SIGTEST TYPE=CHISQUARE. +CTABLES /TABLE qn113 /COMPARETEST TYPE=PROP. + +CTABLES /TABLE qn113 [COUNT.UCL]. + +CTABLES /TABLE qn1 /CATEGORIES **. ]]) AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [1], [[ctables.sps:2.76-2.78: error: CTABLES: Computed category &pc references a @@ -595,8 +635,8 @@ variable string. 8 | CTABLES /TABLE string /CATEGORIES VARIABLES=string [1]. | ^ -ctables.sps:10: error: CTABLES: ROWLABELS=OPPOSITE is not allowed with sorting -based on a summary function. +ctables.sps:10.74-10.86: error: CTABLES: Syntax error at `KEY=MEAN(qn1)': Data- +dependent sorting is not implemented. ctables.sps:12: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be moved to be categorical, but qnd1 is a scale variable. @@ -649,6 +689,24 @@ ctables.sps:23.33-23.37: note: CTABLES: This is a scale variable, so it always has a summary even if the syntax does not explicitly specify one. 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT]. | ^~~~~ + +ctables.sps:25.46-25.63: error: CTABLES: Syntax error at `KEY=PTILE(qn1, 50)': +Data-dependent sorting is not implemented. + +ctables.sps:27.16-27.21: error: CTABLES: Syntax error at `$mrset': Multiple +response set support not implemented. + +ctables.sps:29.23-29.44: error: CTABLES: Syntax error at `SIGTEST +TYPE=CHISQUARE': Support for SIGTEST not yet implemented. + +ctables.sps:30.35-30.43: error: CTABLES: Syntax error at `TYPE=PROP': Support +for COMPARETEST not yet implemented. + +ctables.sps:32.23-32.31: error: CTABLES: Syntax error at `COUNT.UCL': Support +for LCL, UCL, and SE summary functions is not yet implemented. + +ctables.sps:34.32-34.33: error: CTABLES: Syntax error at `**': expecting +VARIABLES. ]]) AT_CLEANUP