SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
  • 1.  SPSS: trying to summarise the ranking of items, from a survey with drag&drop question

    Posted Mon April 10, 2023 03:49 PM
    Edited by Thierry TECH Tue April 11, 2023 12:57 AM

    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

    2

    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
    ------------------------------



  • 2.  RE: SPSS: trying to summarise the ranking of items, from a survey with drag&drop question
    Best Answer

    Posted Mon April 10, 2023 04:18 PM

    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
    ------------------------------



  • 3.  RE: SPSS: trying to summarise the ranking of items, from a survey with drag&drop question

    Posted Mon April 10, 2023 05:02 PM
    Edited by Thierry TECH Tue April 11, 2023 12:57 AM

    Fantastic! Thank you Rick!



    ------------------------------
    Thierry
    ------------------------------



  • 4.  RE: SPSS: trying to summarise the ranking of items, from a survey with drag&drop question

    Posted Mon April 10, 2023 05:48 PM
    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.

    --





  • 5.  RE: SPSS: trying to summarise the ranking of items, from a survey with drag&drop question

    Posted Mon April 10, 2023 05:52 PM

    Jon;

    Yeah, when I saw your solution, I said, "Geez. All I needed to do was move the ROWLABELS!" :\



    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 6.  RE: SPSS: trying to summarise the ranking of items, from a survey with drag&drop question

    Posted Tue April 11, 2023 12:53 AM
    Edited by Thierry TECH Tue April 11, 2023 12:58 AM

    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
    ------------------------------



  • 7.  RE: SPSS: trying to summarise the ranking of items, from a survey with drag&drop question

    Posted Tue April 11, 2023 09:32 AM
    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.

    --





  • 8.  RE: SPSS: trying to summarise the ranking of items, from a survey with drag&drop question

    Posted Mon April 10, 2023 04:29 PM

    Try this

    CTABLES
      /TABLE bmw[c] + mercedes[c] + audi[c].



    ------------------------------
    Jon Peck
    ------------------------------



  • 9.  RE: SPSS: trying to summarise the ranking of items, from a survey with drag&drop question

    Posted Mon April 10, 2023 05:02 PM
    Edited by Thierry TECH Tue April 11, 2023 12:58 AM

    Thank you Jon! 
    Not a 3x3 table but a useful series of tables



    ------------------------------
    Thierry
    ------------------------------