SPSS Statistics

SPSS Statistics

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

 View Only
  • 1.  How to sort IDs in series in a data set.

    Posted Mon July 31, 2023 04:28 PM

    Hi, I am new to spss but was wondering if there is a way to sort data by ID subtype? In short I want to isolate 1000+ Unique data IDs in a series of files, (e.g. say the IDs are 123,2421,4541, 5214... is there a way to make a list that can sort data in a column that has thousands by only these sets of values? New to this program but excited to begin working! Thanks for any and all help! 



    ------------------------------
    Sherif Zineldine
    ------------------------------


  • 2.  RE: How to sort IDs in series in a data set.

    Posted Mon July 31, 2023 05:18 PM
    Typically, you would create a dataset listing the ID values you want plus another constant variable, say, 1.  Sort both files by ID and use MATCH FILES to join them.  Then do 
    SELECT IF constant EQ 1, 
    and the resulting cases will be just the ones where the IDs matched.