Announcement

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

  • Checking Duplications

    I am trying to use xtset and I know how to remove any duplications. Is there a way to see if the non-id/time variables also repeat in value? For example, if I have
    id year X
    1 1 4
    1 1 4
    Could I see if X repeats along with those same observation id and year?

  • #2
    Code:
    by id year (X), sort: gen byte changing_x = (x[1] != x[_N])
    browse if changing_x
    will show you any id-year combinations where the value of x is not a constant within that group.

    Comment

    Working...
    X