Announcement

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

  • How to create a paired unit identifier?

    In the help file of did_imputation, I saw that when using triple diff:

    22) Triple-diffs:
    When observations are defined by i,g,t when, say, i are counties and g are age groups, specify a variable ig identifying the (i,g) pairs as the unit identifier, add appropriate
    FEs, and choose your clustering level, e.g.:
    . did_imputation Y ig t Eig, fe(ig i#t g#t) cluster(i) ...

    Note that the event time Eig should be specific to the i,g pairs, not to the i. For instance, Eig is missing for a never-treated age group in a county where other groups are treated at some point.
    I am wondering how to create the variable ig based on the (i,g) pairs? I have the variables i and g in my sample, I do not know how to create the variable ig as mentioned.

    Could you please help me to sort it out?
    Many thanks and warm regards.

  • #2
    Code:
    egen ig = group(i g)

    Comment

    Working...
    X