SPSS Statistics

SPSS Statistics

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

 View Only
  • 1.  Data grouping in SPSS

    Posted Thu October 19, 2023 10:40 AM

    Hi team,

    Greetings everyone, my name is Michael Yang from New Zealand and I am a 1st year PhD student. I am new to SPSS and would really like to get some assistance and advice form this forum :)

    Currently I am working on a dataset in SPSS and need some advice on how to group or split the data for further analysis. The data contains over 600K records with many variables, I have come up with different selection criteria to group the data into different groups, for instance, group one is X variable = a & Y variable > b & Z variable = c; group two is X variable = d & Z variable < e and so forth for the remaining groups. As you can see, each group will have a different selection criteria and maybe different variables too. In total, there are about 9 to 10 groups from the same dataset which I wanted to conduct some trend analysis on by comparing different groups. So my question is, what might be the best way for me to go about in grouping the data? Is there a way to define the selection criteria for each group and store it, so that I can easily analyse and compare between groups?

    Thanks very much for all your help and advice in advance! 



    ------------------------------
    Michael Yang
    ------------------------------


  • 2.  RE: Data grouping in SPSS

    Posted Fri October 20, 2023 06:17 PM
    I expect that you would want the groups to be mutually exclusive.  You could write something like
    do if (first-condition).
      compute group = 1.
    else if (second condition).
      compute group = 2
    ...
    end if.

    --