statisticspivot-tablespss

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


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!


Solution

  • Instead of using CUSTOM TABLES for this analysis, you can restructure the datat to make it a regular table easier to analyse:

    varstocases /make rnk from BMW Mercedes Audi/index=brand(rnk).
    

    From here you can use regular analysis, for example:

    aggregate out=* /break=model rnk/n=n.
    

    or to get results in the output:

    sort cases by model.
    split file by model.
    freq rnk.
    split file off.