Announcement

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

  • Interactions with continous variables in Difference in Differences (ETWFE) models


    Dear All,

    I am estimating a DiD model, and I would like to examine if treatment is conditional on the value of a continuous variable. I am using Wooldrige ETWFE approach, but I am not sure how to deal with continuous variables interaction, to evaluate whether treatment effect is different across different values of my variable.

    Take the follwing example

    Code:
    frause mpdta.dta, clear
    * run a simple model, with the objective of examining if the treatment effect is conditional on population
    jwdid lemp lpop, ivar(countyreal) tvar(year) gvar(first_treat) group
    * if I try to examine the impact over different level of population I get an error
    estat simple, estore(jw_static) over(lpop)
    only integer values are allowed in over() and within() variables
    My question is whether I can run this model with an interaction with a continuous variable, and if it is correct, how to I estimate the effect of the interaction and report it

    Thanks a lot in advance for your help

    Best

  • #2
    estat simple, estore(jw_static) at(lpop = (1(1)8))

    Comment


    • #3
      Dear George,
      thank you very much for this, it is indeed extremely helpful! I am however, not entirely sure how to go interpret these findings.
      I ran the code you suggested and I get the marginal effect of the treatment.
      But I am not entirely sure I understand this correctly. Can you confirm that the first coefficient I observe (-.05) is it the overall effect of the treatment?

      Also, do you know how I can test and report results of whether this interaction is significant?

      thanks a lot for your support.

      Code:
      estat simple, estore(jw_static) at(lpop = (1(1)8))
      ------------------------------------------------------------------------------
                   |            Delta-method
                   | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
      -------------+----------------------------------------------------------------
            simple |   -.050627   .0124973    -4.05   0.000    -.0751212   -.0261329
            simple |  -2.872817    .056439   -50.90   0.000    -2.983435   -2.762198
            simple |  -1.761559   .0356202   -49.45   0.000    -1.831373   -1.691745
            simple |  -.6503013   .0172285   -37.75   0.000    -.6840684   -.6165341
            simple |   .4609565   .0164142    28.08   0.000     .4287853    .4931277
            simple |   1.572214   .0344473    45.64   0.000     1.504699     1.63973
            simple |   2.683472   .0552123    48.60   0.000     2.575258    2.791686
            simple |    3.79473   .0765164    49.59   0.000      3.64476    3.944699
            simple |   4.905988   .0980087    50.06   0.000     4.713894    5.098081
      ------------------------------------------------------------------------------

      Comment


      • #4
        I don't know if it means anything at all. The model is linear, and there's no interaction, so who knows?

        Comment


        • #5
          You may do better if you create groups based on population size, and then get thr simple estimates over that variable

          Comment


          • #6
            Hello everyone,
            Following up with this question, FernandoRios, when instead we are interested in using a categorical covariate (say, country for a multi-country study), should I use jwdid y i.country or simply jwdid y country? I have the impression that when I am not using i.covariate the Stata doesn't "know" my variables are factor but I do not know how the package understands this syntax
            Thank you so much,

            Comment

            Working...
            X