Announcement

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

  • Graph of event study with interaction term

    Dear Clyde and All,

    I would like to graph an event study with an interaction term. I am performing an event study where the dependent variable is earnings and the 'event' is the first ten years of motherhood (where i.event_indicator==1). I have interacted this event indicator with a standardised measure of a norm-related statement originally recorded on a Likert scale (this measure is indicated by c.intstandnorm1). i.agepart is fixed effects of age to counter against life-cycle trends. i.wave is fixed effects of years to counter business-cycle trends. Dif !=-1 means I remove the year directly before giving birth as this is my reference point. Here is my equation:

    reg marketincpart c.intstandnorm1##i.event_indicator i.agepart i.wave if dif !=-1

    I have attached the results of the above equation. I would like my graph to resemble those found in Kleven, Landais and Sogaard (2019) (also see attachment). I would like the event study graph to have one line for those at the 10th percentile of the norm measure and one line for those at the 90th percentile of the norm measure. In this way, I can see how different values of the norm measure affect earnings differently post-birth. I am stumped how to do this and would really appreciate some help.

    Best regards,

    Jane Wakeford
    Attached Files

  • #2
    coefplot from ssc will be a good starting point for you.

    I'd recommend looking through the Statalist FAQ for details about how to share data and code here.

    Here's an example that will get you headed in the right direction:

    Code:
    coefplot, baselevel omitted drop(marketincpart *intstandnorm1* *agepart* *wave* ) /// drop everything you don't want to plot
        rename(^.*([0-9][0-9][0-9][0-9]).*$ = \1, regex) /// this cleans up the names of the variables generated by "i.event_indicator"
        vertical levels(90) yline(0)  ///
        ciopts(lwidth(1.15) lcolor(*.5)) /// I'm including a confidence interval 
        recast(connected) ///
        ytitle("Earnings relative to event") //

    Comment

    Working...
    X