pspp-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CTABLES sample size & total


From: ft gmail
Subject: Re: CTABLES sample size & total
Date: Sat, 23 Dec 2023 12:14:27 +0100
User-agent: Mozilla Thunderbird

Hi Frans,

I shall follow your info. Thanks !

Have a good Christmas,

ftr

Le 22/12/2023 à 16:18, Frans Houweling a écrit :

Hi ft,

  have a look at the /CATEGORIES subcommand.

Manual:  https://benpfaff.org/~blp/pspp-master/20231105144641/source/user-manual/pspp.html#CTABLES-Totals-and-Subtotals .


Good luck!
frans

On 12/22/23 12:33, ft gmail wrote:

Hi,

I try to create a CTABLES cross tabulation with row percentages in the cells, and with the sample size as the last column plus a row for the total. 

And I don't find the way how to create it.

My current syntax:

ctables /table tradin5  [rowpct  pct3.0 ]   by  alter5

produces the following:

                                     Custom Tables
╭─────────────────────────────────────┬──────────────────────────────────────────────╮
│                                     │  alter5 alternative religiosity (regrouped)  │
│                                     ├────────┬─────────┬────────┬─────────┬────────┤
│                                     │  1 - - │   2 -   │   3 0  │   4 +   │  5 + + │
│                                     ├────────┼─────────┼────────┼─────────┼────────┤
│                                     │  Row % │  Row %  │  Row % │  Row %  │  Row % │
├─────────────────────────────────────┼────────┼─────────┼────────┼─────────┼────────┤
│tradin5 traditional religiosity 1 - -│     16%│      65%│     17%│       3%│      0%│
│                                2 -  │      7%│      48%│     36%│       8%│      0%│
│                                3 0  │      4%│      32%│     46%│      17%│      1%│
│                                4 +  │      4%│      28%│     45%│      22%│      2%│
│                                5 + +│      8%│      37%│     38%│      15%│      2%│
╰─────────────────────────────────────┴────────┴─────────┴────────┴─────────┴────────╯

Which is quite proper.

But I want to get a tabulation with something like this one:

╭─────────────────────────────────────┬──────────────────────────────────────────────╮
│                                     │  alter5 alternative religiosity (regrouped)  │
│                                     ├────────┬─────────┬────────┬─────────┬────────┤
│                                     │  1 - - │   2 -   │   3 0  │   4 +   │  5 + + │total
│                                     ├────────┼─────────┼────────┼─────────┼────────┤
│                                     │  Row % │  Row %  │  Row % │  Row %  │  Row % │   n
├─────────────────────────────────────┼────────┼─────────┼────────┼─────────┼────────┤
│tradin5 traditional religiosity 1 - -│     16%│      65%│     17%│       3%│      0%│ 125
│                                2 -  │      7%│      48%│     36%│       8%│      0%│  67
│                                3 0  │      4%│      32%│     46%│      17%│      1%│ 511
│                                4 +  │      4%│      28%│     45%│      22%│      2%│ 231
│                                5 + +│      8%│      37%│     38%│      15%│      2%│  54
├─────────────────────────────────────┼────────┼─────────┼────────┼─────────┼────────┤

│ total                               │      8%│      37%│     38%│      15%│      2%│  ...
╰─────────────────────────────────────┴────────┴─────────┴────────┴─────────┴────────╯

Where do I find this in the help pages ?


Thanks in advance

- ftr


reply via email to

[Prev in Thread] Current Thread [Next in Thread]