SPSS Statistics

SPSS Statistics

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

 View Only
  • 1.  selecting cases out of a variable

    Posted Mon May 09, 2022 09:20 AM
    Hi, 

    I'm writing my thesis about several political groups. And for these groups I have different and seperate variables in SPSS. One group is called LVSV, one group KVHV, one group CD&V,... 
    In total there are 11 different groups and I all gave them a different value: Lvsv = value 1, kvhv=value 2,... 

    Yet there are members who can be part of several of these groups. How do I filter people out that are only part of one group for example LVSV and not for example part of LVSV and CD&V

    Do I first have to merge all the variables into one big variable 'political groups'? But how do I do this? Because if I try to do it through: 'compute variable Max.' and someone is a member of two groups, it just takes the group that has the highest number as the outcome. 

    COMPUTE organisaties2=MAX(lvsv,kvhv,cds,nsv,jong_cdv,jongsocialisten,jong_groen,jong_nva,jong_vlld, vbj,comac).

    thanks a lot! 

    Kind regards, 

    Margot


    ------------------------------
    Margot Floru
    ------------------------------

    #SPSSStatistics


  • 2.  RE: selecting cases out of a variable

    Posted Mon May 09, 2022 09:43 AM
    Hi. Before you coded anything, I would have recommended 11 different variables, each coded 0 or 1, 1 if member of group, 0 otherwise. Then, you could use the COUNT command to create a new variable that counts how many groups any person is a member of. And you could create a MULT RESPONSE variable (look up MRSETS for Custom Tables) or the MULT RESPONSE command.

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



  • 3.  RE: selecting cases out of a variable

    Posted Mon May 09, 2022 09:46 AM
    Pressed "Post" too soon. :)

    As it is now, you could still do what I recommended. First, use the RECODE command to recode the different values of the variables you created to 1. For example:

    RECODE lvsv kvhv cds nsv jong_cdv jongsocialisten jong_groen jong_nva jong_vlld vbj comac (0=0) (1 THRU HI=1).
    EXECUTE.



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