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)
   

Comment Type & Canned Response:
       

 

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>
Project 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>
Project 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>
Project 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 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.9