Announcement

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

  • How to identify people who appear more than once in my data, but have different values recorded for race?

    Some people appear more than once in my data and, for some, at one point "race" is coded as white and at a different point, it's coded as Black for the same individual. I'd like to be able to identify each time an id has their race recorded differently over time so that I can try to resolve some of these discrepancies when possible. My data is in long format (I'd like to keep it this way, if possible). Thanks!


  • #2
    the basic idea is to sort the data in the order you want (but certainly within person) and check for differences in race; since you did not provide an example of your data using -dataex- (please read the FAQ), exact code cannot be provided

    Comment


    • #3
      See https://www.stata.com/support/faqs/d...ions-in-group/ for an elaboration of Rich Goldstein's proposal.

      Comment


      • #4
        Originally posted by Nick Cox View Post
        See https://www.stata.com/support/faqs/d...ions-in-group/ for an elaboration of Rich Goldstein's proposal.
        Thank you so much! This is exactly what I needed.

        Comment

        Working...
        X