Announcement

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

  • Difference-in-difference graph

    Dear Statalist,

    I have a DiD regression on panel data as below:
    ROA = beta0 + beta1.Treatment + beta2.Post + beta3.Treat.Post + Firm-level control (Xi) + e(i,t)

    The data is bank-level, ROA is Return on Asset, Treatment = 1 if bank in the group receives subsidiary and 0 otherwise, Post = 1 after the Government support the subsidiary. X(i,t) is set of firm-level control variables. I also control for time-effect and firm-fixed effects.

    I used Stata and estimates the above equation and got the results:
    ROA = 0.184 + 1.235.Post + 0.347.Treat.Post + Firm-level control (Xi) + e(i,t)

    I have some questions:
    1. The treatment variable is dropped from Stata results (multicollinearity). I have read some posts about this issue before but still wondering if it is a big problem for my model.
    2. Can you please help to advise on how to draw the graph to present the parallel trends before the treatment and effects of treatment effects.
    Many thanks,


  • #2
    1. With the design you have chosen, the treatment variable is a time-invariant attribute of the firm. Consequently, it is colinear with the firm fixed-effect, so it is omitted. Not only is this not a problem, if this didn't happen it would mean that there is something wrong with your data!

    2. You don't show example data, but you can adapt this code to your specifics:
    Code:
    collapse (mean) ROA time, by(treat)
    reshape wide ROA, i(time) j(treat)
    graph twoway connect ROA* time if !post, sort
    Last edited by Clyde Schechter; 22 Jan 2025, 10:20.

    Comment


    • #3
      Dear Clyde Schechter ,

      Thank you very much. I understood the issues (1) and can draw the graph as you suggested in (2) now.

      However, I still have one more question to ask. For the graph, can you please instruct me on how to draw the graph to illustrates the effects of regression coefficients (beta = 0.347) for the variables Treat*Post overtime period? As I want to illustrates the effect magnitude (with upper and lower range) of government policy on firm's ROA over time.

      Many thanks.

      Comment


      • #4
        One way to visualize the effect of the treatment is to do the same graph as used for parallel trends, but include the post-intervention time periods. So it's the same -graph- command as in #2, but omitting -if !post-.

        Comment

        Working...
        X