Announcement

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

  • Treat and control variable

    Hi, I am trying to create both treatment and control variables based on a set of conditions. My question is how a policy that came in on the 3rd of March may affect the wage rate of an individual.
    I created a pre-variable. Pre == 1 if the date is before 3rd March.
    I also created a post variable. Post == 1 if the date is after 3rd March.

    I'm trying to create the treat and control variable based on the individual's wage rate and pre/post variable.
    If the individual earns less than $3000 before the 3rd march, then treat ==1. I did it the following wat
    generate treat = 0
    replace treat=1 if wagerate<3000 & pre==1

    Now I'm trying to create the control variable but I'm slightly struggling. The control group should be those earning above $3000 before the pre period and should not be affected by the policy. Therefore I tried the following
    generate control = 0
    replace control=1 if wagerate>3000 & pre==1 & wagerate => 3000 in post=1

    It is not working fo the control and was wondering if there is a better way to do this. Thank you

  • #2
    Lilly:
    In the pre-policy era, those who do not belong to the treatment group have an income of or more than €3000.
    If I'm correct with assuming that you are planning to perform a DID, why not trying:
    Code:
    replace treat=1 if wagerate>=3000 & pre==1
    In addition, -in post=1- is illegal syntaxis.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Lilly: It looks like you have a sharp regression discontinuity design, where treatment is determined by initial wagerate. You might want to look at rdrobust.

      Comment


      • #4
        Hi, it is a DiD approach where I'm trying to see a difference in wage rate after the policy. The treatment group is those who see a wage rate increase greater than 3000. Whilst the control group should be those, who are not affected by the policy. These individuals already earn 3000 before the treatment and do not see any change in their wage rate post-period.


        I had successfully created the treat variable but not the control variable. I tried
        generate control = 0
        replace control=1 if wagerate>3000 & pre==1 & wage rate =3000 in post=1
        But I don't think its correct

        Comment


        • #5
          Is your data set in long or wide format? That is, do you have two record (time periods) per person or just one? Or maybe you figured this out.

          In my view, you still should be using RD, but you can use DiD if you insist. But you should show a sample of your data.

          Comment

          Working...
          X