Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Overview on how often an ID occurs in a column

    Hi,

    I have a question which should be fairly easy to answer. I have a variable in my dataset called ind_id (individual ids). I want to get an overview of how often each ID occurs in the column. Ideally, I could also perform some basic descriptive statistics on the result (i.e. max/min, average, percentile). Thanks for your help.

    Best, Valentin

  • #2
    Check out the -duplicates- and -collapse- commands.

    Comment


    • #3
      Code:
      h contract
      and check the options carefully to get exactly what you want; it sounds, though you are not completely clear, as though you will want the "freq" option and then us summarize on the result

      added: note that I am assuming that the variable of interest is a string - but with no data example (please read the FAQ), I can't know

      Comment


      • #4
        Thanks for your answers. Here is an extract of the data...and yes, type is str

        ind_id
        1772
        7627
        8103
        10557
        29388
        30498
        38114
        48975
        1772
        7627
        8103
        10557
        29388
        30498
        38114

        Comment

        Working...
        X