Announcement

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

  • complex tag - I think

    Hello, below is a case where a person has 2 rows of data and and 2 different values for the variable lx_item_id_rc on the same date (dos_rc). I am trying to identify all participants in the dataset that more than 1 value for lx_item_id on the same date. Suggestions are really appreciated.

    n1 enc_id lx_item_id_rc lx_item lx_item_value class dos_rc
    60 276429554 429 STAGE II (CHECK ALL THAT APPLY) General Conditioning 2) Stage 2 02may2017
    70 276429554 428 STAGE 1 (CHECK ONE) Stabilization 1) Stage 1 02may2017

  • #2
    Code:
    duplicates tag enc_id dos_rc, gen(flag)
    browse if flag
    In the future, when showing data examples, please use the -dataex- command to do so. If you are running version 17, 16 or a fully updated version 15.1 or 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

    Comment


    • #3
      Understood and will do. Thanks.

      Comment

      Working...
      X