Announcement

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

  • Unique Observations in a variable

    Hello ! Im new to stata and really enjoy using it so far.

    I have a list of about 20,000 observations and want to display and count the unique observations.

    I have used codebook then variable name telling me I have 210 unique observations, is there a way to list all the unique observations and count them?

  • #2
    -help duplicates-
    Code:
    duplicates tag *, gen(dupe)
    tab dupe
    list if !dupe

    Comment


    • #3
      Welcome to Statalist.

      is there a way to list all the unique observations and count them?
      Your problem statement suggests to me that you did something like
      Code:
      codebook myvar
      which reported that myvar has 210 distinct values. In that case
      Code:
      tab myvar
      should do what you want.

      Comment


      • #4
        <deleted>

        Comment

        Working...
        X