Announcement

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

  • Duplicate Data finding

    on my work sheet i deal with a variable named rmid this mrid contains individual information...i need to find out duplicate rmids from my work sheet.. please any one help me with the command of duplicate data(rmid)
    rmid
    0112996
    0113996
    0112587
    0112996
    0225070
    0145562
    1112567
    0112587

  • #2
    Raeedur:
    you may want to try:
    Code:
    duplicates tag rmid, g(flag)
    tab flag
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Dear Lazzara Sir
      Thank you for your help it works nice for me
      sir if i want to see those d uplicates "rmids" at "Data Editor" what shoul i do


      Comment


      • #4
        Code:
        bysort rmid:  gen duplicate = cond(_N==1,0,_n)
        will give the number of observations with each rmid; 1 for first observation, 2 for first duplicate, 3 for second duplicate etc

        Comment


        • #5
          Raeedur:
          look for the variables named -flag-.
          Kind regards,
          Carlo
          (Stata 18.0 SE)

          Comment


          • #6
            Thank you all
            regards
            raeed

            Comment


            • #7
              carlo sir cant understand ur last advice

              Comment


              • #8
                Raeedur:
                I meant that, if you open the Editor after running the code, you will find the variable named -flag-.
                Kind regards,
                Carlo
                (Stata 18.0 SE)

                Comment

                Working...
                X