The [c] is not needed if the measurement level of the variables is set to nominal or ordinal, but it does no harm to specify it in the command.
--
Original Message:
Sent: 4/11/2023 12:53:00 AM
From: Thierry TECH
Subject: RE: SPSS: trying to summarise the ranking of items, from a survey with drag&drop question
Thank you again Jon - this is very elegant! we still need the [c]:
CTABLES
/TABLE bmw[c] + mercedes[c] + audi[c]
/CLABELS ROWLABELS=OPPOSITE.
------------------------------
Thierry
------------------------------
Original Message:
Sent: Mon April 10, 2023 05:47 PM
From: Jon Peck
Subject: SPSS: trying to summarise the ranking of items, from a survey with drag&drop question
Rick's solution is perfectly fine, but to show off CTABLES a little more, here is that table with just CTABLES. The key is to swing the categories to the column dimension.
CTABLES
/TABLE BMW + Mercedes + Audi
/CLABELS ROWLABELS=OPPOSITE.
--
Original Message:
Sent: 4/10/2023 5:02:00 PM
From: Thierry GAILLET
Subject: RE: SPSS: trying to summarise the ranking of items, from a survey with drag&drop question
Fantastic! Thank you Rick!
------------------------------
Thierry GAILLET
Original Message:
Sent: Mon April 10, 2023 04:18 PM
From: Rick Marcantonio
Subject: SPSS: trying to summarise the ranking of items, from a survey with drag&drop question
I think this may do what you want:
DATA LIST FREE /BMW Mercedes Audi.
BEGIN DATA.
1 3 2
2 1 3
2 3 1
1 2 3
3 1 2
END DATA.
VARSTOCASES /MAKE car FROM BMW Mercedes Audi /INDEX=rank(3).
VALUE LABELS car 1 "BMW" 2 "Mercedes" 3 "Audi".
CTABLES
/VLABELS VARIABLES=car rank DISPLAY=LABEL
/TABLE car BY rank [COUNT F40.0]
/CATEGORIES VARIABLES=car rank ORDER=A KEY=VALUE EMPTY=EXCLUDE
/CRITERIA CILEVEL=95.
------------------------------
Rick Marcantonio
Quality Assurance
IBM
Original Message:
Sent: Mon April 10, 2023 07:16 AM
From: Thierry GAILLET
Subject: SPSS: trying to summarise the ranking of items, from a survey with drag&drop question
Hello,
I get the following data from a survey, with just a drag&drop question to rank favorite brands, between BMW, Mercedes, and Audi:
|
BMW
|
Mercedes
|
Audi
|
|
1
|
3
|
2
|
|
2
|
1
|
3
|
|
2
|
3
|
1
|
|
1
|
2
|
3
|
|
3
|
1
|
2
|
With SPSS, I need to output a table of counts for Rank vs. Brand, such as:
|
Rank x Brand
|
BMW
|
Mercedes
|
Audi
|
|
1
|
2
|
2
|
1
|
|
2
|
2
|
1
|
2
|
|
3
|
1
|
3
|
2
|
Please help me writing the relevant syntax for the command.
I already tried multiple commands, using FREQUENCIES and also tried to group variables, with multiple response sets, etc.
I just get partial frequencies and was never able to articulate any CROSSTABS neither from my 3 variables.
Maybe I should create additional variables with formulas but cannot figure out how...
Thank you so much for your help!
------------------------------
Thierry GAILLET
------------------------------