SPSS Statistics

SPSS Statistics

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

 View Only
  • 1.  duplicates cases identification with a condition

    Posted Fri September 04, 2020 07:48 PM

    i have a data set with a duplicate identifier variable "visitlink". i want to identify duplicates but only for specific cases which i have coded variable "index" =1.

    when i use the identify duplicate dialogue i assume if i use the "visitlink" as the identifier it will code all the duplicates as 0 and primary as 1, but i only want duplicates identified for cases with variable "index"=1.

    duplicates of cases that are not coded as 1 are not needed.

    is there any way i can do that?






    #SPSSStatistics
    #Support
    #SupportMigration


  • 2.  RE: duplicates cases identification with a condition

    Posted Fri September 04, 2020 08:43 PM

    The simplest way would be to do this.

    • Use DATASET COPY to make two copies of the data - named, say NE and NOT1.
    • Activate ONE and use SELECT IF (Data > Select Cases) to select only cases where INDEX EQ 1
    • Use the Identify Cases dialog to identify the duplicates and do whatever processing you want for that.
    • Activate NOT1 and use SELECT IF to select only cases where INDEX NE 1
    • Merge the two datasets using ADD FILES (Data > Merge Files > Add Cases)
    • The duplicate indicating variables in the NOT1 data will have system missing values.





    #SPSSStatistics
    #Support
    #SupportMigration


  • 3.  RE: duplicates cases identification with a condition

    Posted Fri September 04, 2020 09:15 PM

    Thank you for your help.

    however, i want to find duplicates of INDEX EQ 1 cases within the main data. Not duplicates within INDEX EQ 1 cases.

    I beleive i wasnt clear about this point.

    My only selecting cases of INDEX EQ 1 doesnt solve my problem. I need to somehow select duplicates of cases INDEX EQ 1 without selecting any/all duplicates within main data.






    #SPSSStatistics
    #Support
    #SupportMigration


  • 4.  RE: duplicates cases identification with a condition

    Posted Fri September 04, 2020 09:43 PM

    If you want to send me the data and the definition of duplicates, I can put together some code using the SPSSINC TRANS extension command, which you can install from the Extensions > Extension Hub menu. (jkpeckSupport Member)






    #SPSSStatistics
    #Support
    #SupportMigration