Search code examples
spss

How to count cases with the same ID but different values on a second variable using SPSS?


I have a problem with SPSS. For instance, the person with 16 ID at the start of SPSS file is affiliated with both boston scientific coorp and american water works. Can I detect how many cases like this (in percentage and number)?

enter image description here


Solution

    1. Define duplicates based on the two variables: data - identify duplicate cases - Define matching cases by personid and name; this will create a new variable that identifies cases with the same personid and name combination
    2. Apply a filter to exclude duplicates: data -selecte cases
    3. Perform frequency analysis on personid: e.g., analyze - descriptives - frequencies