Thank you very much, Ben. Your solution looks far better. Though I
worked with CTABLES years ago, a steep re-learning curve rests.
Does PSPP intend to replace a specific version of SPSS CTABLES ?
Unfortunately , I did not find a good website (or book) for
self-learning CTABLES with syntax, not by point and click.
The best I found was a SPSS TABLES 11.5 manual. Is there anything better ?
Best regards
- ftr
Le 21/10/2024 à 18:23, Ben Pfaff a écrit :
CTABLES should work with TEMPORARY. I'm surprised that it doesn't. It
works for me with your data.
Here is how to get the totals column. There might be a way to get a %
Total row too; I didn't have time to figure it out.
set /tnumbers labels.
temp.
recode d60 (7=3)./* missing =7 recoded into almost never or never = 3 .
CTABLES
/WEIGHT VARIABLE W1
/VLABELS VARIABLES qa1a_1 DISPLAY LABEL
/TABLE qa1a_1 [ROWPCT PCT5.0, TOTALS[COUNT]] by d60
/TITLES TITLE "Situation of country & respondent by individual
economic difficulties" CORNER "Row %"
/CATEGORIES VARIABLES d60 EMPTY=EXCLUDE TOTAL=YES POSITION AFTER
/CATEGORIES VARIABLES qa1a_1 EMPTY=EXCLUDE POSITION AFTER .
With this, I get:
Situation of country & respondent by individual
economic difficulties
╭──────────────────────────────────────┬───────────────────────────────────────────────────────────╮
│ │ DIFFICULTIES PAYING
BILLS - LAST YEAR │
│
├────────────────┬─────────────────┬──────────────────┬─────┤
│ │Most of the time│From time to
time│Almost never/never│Total│
│
├────────────────┼─────────────────┼──────────────────┼─────┤
│Row % │ Row % │ Row %
│ Row % │Count│
├──────────────────────────────────────┼────────────────┼─────────────────┼──────────────────┼─────┤
│SITUATION: COUNTRY GENERAL very bad │ 22%│
36%│ 42%│ 5529│
│ rather bad │ 11%│
32%│ 57%│15303│
│ rather good│ 6%│
22%│ 72%│16411│
│ very good │ 11%│
21%│ 68%│ 2838│
╰──────────────────────────────────────┴────────────────┴─────────────────┴──────────────────┴─────╯
On Fri, Oct 18, 2024 at 6:29 AM ft gmail <public....@gmail.com> wrote:
Hi,
I try to exploit the wide possibilities that the procedure CTABLES
allows and which I have used years ago with SPSS but today, I am stuck
with a recent Eurobarometer 94.3 survey file from 2021.
I have two questions:
1/ To make the CTABLES output more readable I temporarily recode two
small categories of the column variable D60 into one, to make the
spontaneous Refusal category disappear.
This has no effect.
Does CTABLES accept the TEMPORARY command ? Or how to get the result I
want ?
2/ I want to get a colum with total N at the right end of the table and
a row with the Total % in the last row.
I vaguely remember that you have to create a dummy variable and
concatenate it to get a total with counts for a table with percentages
but this did not work. Also I did not find an explanation in the PSPP
manual how to get a row total %.. The TOTAL YES command created an empty
row with the title I defined before.
set /tnumbers labels.
temp.
recode d60 (7=3)./* missing =7 recoded into almost never or never = 3 .
CTABLES
/WEIGHT VARIABLE W1
/VLABELS VARIABLES qa1a_1 DISPLAY LABEL
/TABLE qa1a_1 [ROWPCT "" PCT5.0] by d60
/TITLES TITLE "Situation of country & respondent by individual economic
difficulties" CORNER "Row %"
/CATEGORIES VARIABLES qa1a_1 T EMPTY=EXCLUDE TOTAL=YES LABEL "Total"
POSITION AFTER .
Situation of country & respondent by individual
economic difficulties
╭──────────────────────────────────────┬──────────────────────────────────────────────────────────────────────╮
│ │ d60 DIFFICULTIES
PAYING BILLS - LAST YEAR │
│ ├────────────────┬─────────────────┬──────────────────┬────────────────┤
│ │Most of the time│From time to
time│Almost never/never│Refusal (SPONT.)│
│Row %
├────────────────┼─────────────────┼──────────────────┼────────────────┤
├──────────────────────────────────────┼────────────────┼─────────────────┼──────────────────┼────────────────┤
│SITUATION: COUNTRY GENERAL very bad │ 22%│
36%│ 42%│ 1%│
│ rather bad │ 11%│
32%│ 56%│ 1%│
│ rather good│ 6%│
22%│ 72%│ 0%│
│ very good │ 11%│
21%│ 68%│ 0%│
│ Total │ .│
.│ .│ .│
╰──────────────────────────────────────┴────────────────┴─────────────────┴──────────────────┴────────────────╯
For the rest: good work. I use the last nightly share with Windows 11
which for the rest runs smoothly.
The CTABLES GUI does not seem to be finished. Am I right, or do I miss
something ?
You can find the date used in a SPSS SAV file here : https://
www.dropbox.com/scl/fi/qzo4xyn26g6da37mkygy1/EB-94.3-short.sav?rlkey=cukm2lbx8nav91suvgj407iqp&st=wo17dy37&dl=0
Any help appreciated
-ftr
Informations système
╭───────────────────────────────────┬──────────────────────────────────────────╮
│Version │GNU pspp
2.0.1-g486e58 │
│Host System │x86_64-w64-mingw32 │
│Système en construction │x86_64-pc-linux-gnu │
│Répertoire des paramètres régionaux│C:\Program Files\PSPP
nightly/share/locale│
│Journal File │C:/Users/TOSHIBA/pspp.jnl │
│Compiler Version │10-win32
20210110 │
╰───────────────────────────────────┴──────────────────────────────────────────╯