bugPSPP - Bugs: bug #62995, CTABLES totals interaction with...

 
 

bug #62995: CTABLES totals interaction with percentages

Submitter:  Ben Pfaff <blp>
Submitted:  Thu 01 Sep 2022 01:03:10 AM UTC
   
 
Category:  Other Severity:  5 - Average
Status:  None Assigned to:  blp
Open/Closed:  Open Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 21 Jun 2023 05:05:22 AM UTC, comment #5: 


> Can this bug be closed?


No, it's not fixed, I just know what the correct output should be now.

Ben Pfaff <blp>
Group administrator
Wed 21 Jun 2023 04:45:56 AM UTC, comment #4: 

Can this bug be closed?

John Darrington <jmd>
Group administrator
Mon 28 Nov 2022 07:19:59 AM UTC, comment #3: 

A helpful person showed me that the '.'s should be 44.7% and 55.3%.

Ben Pfaff <blp>
Group administrator
Sat 26 Nov 2022 01:02:41 AM UTC, comment #2: 

I sent the following syntax off to a helpful person for clarification, to see what it does in SPSS:


DATA LIST LIST NOTABLE/gender region weight.
VALUE LABELS gender 1 'M' 2 'F' / region 1 'NE' 2 'MW' 3 'S' 4 'W'.
WEIGHT BY weight.
BEGIN DATA.
1 1 607
1 2 719
1 3 1094
1 4 712
2 1 802
2 2 935
2 3 1296
2 4 834
END DATA.
CTABLES
  /TABLE = gender [COUNT, COLPCT] BY region
  /SLABELS POSITION=ROW
  /CATEGORIES VARIABLES = region TOTAL = YES.


Ben Pfaff <blp>
Group administrator
Sat 26 Nov 2022 12:41:02 AM UTC, comment #1: 

The following syntax and output makes the problem clearer:


GET 'nhtsa.sav'.
compute sex = qns3a.
CTABLES
  /TABLE = Sex [COUNT, COLPCT] BY region
  /SLABELS POSITION=ROW
  /CATEGORIES VARIABLES = region TOTAL = YES.



                  Custom Tables
╭─────────────────┬─────────────────────────────╮
│                 │            Region           │
│                 ├─────┬─────┬─────┬─────┬─────┤
│                 │  NE │  MW │  S  │  W  │Total│
├─────────────────┼─────┼─────┼─────┼─────┼─────┤
│sex 1.00 Count   │  607│  719│ 1094│  712│ 3132│
│         Column %│43.1%│43.5%│45.8%│46.1%│    .│
│   ╶─────────────┼─────┼─────┼─────┼─────┼─────┤
│    2.00 Count   │  802│  935│ 1296│  834│ 3867│
│         Column %│56.9%│56.5%│54.2%│53.9%│    .│
╰─────────────────┴─────┴─────┴─────┴─────┴─────╯


Ben Pfaff <blp>
Group administrator
Thu 01 Sep 2022 01:03:10 AM UTC, original submission:  

Using the nhtsa.sav example data, the following:


GET 'nhtsa.sav'.
compute sex = qns3a.
CTABLES
  /TABLE = Sex [COLPCT] BY region
  /CATEGORIES VARIABLES = region TOTAL = YES.


yields the following unexpected output (the total column should not be missing values):


                     Custom Tables
╭────────┬────────────────────────────────────────────╮
│        │                   Region                   │
│        ├────────┬────────┬────────┬────────┬────────┤
│        │   NE   │   MW   │    S   │    W   │  Total │
│        ├────────┼────────┼────────┼────────┼────────┤
│        │Column %│Column %│Column %│Column %│Column %│
├────────┼────────┼────────┼────────┼────────┼────────┤
│sex 1.00│   43.1%│   43.5%│   45.8%│   46.1%│       .│
│    2.00│   56.9%│   56.5%│   54.2%│   53.9%│       .│
╰────────┴────────┴────────┴────────┴────────┴────────╯


Reported by Frans Houweling.

Ben Pfaff <blp>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jmd (Posted a comment)
  • -email is unavailable- added by blp (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code