Announcement

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

  • Rolling Regression Panel Data - Parallel Trend Assumption

    Hi there, I am new to STATA and trying to run a rolling regression on panel data;

    I have stock prices for 54 companies monthly for 10 years (fig.1) and convert them to panel data (fig.2). The first 10 companies are treatment group and the rest are control group (Difference in Difference model)

    1. to generate panel regression:
    encode code, gen(con_cod)
    xtset con_cod time
    xtreg ln_ri dummy, fe

    2. to generate rolling regression
    asreg ln_ri dummy, wind(time 36)


    The problem with the second part is that it gives me coefficients for each company at each point in time. However, I need to regress the treatment group over the control group and get the overall coefficient at each month (Parallel Trend Assumption, Fig3. y-axis: coefficients and x-axis: time)

    Any help would be appreciated.



    Attached Files

  • #2
    like this?

    Code:
    xtreg ln_ri  i.time#c.dummy, fe

    Comment


    • #3
      George Ford thank you for the suggestion. But the coefficients I get with this one are not reflective of what we have with xtreg

      Comment


      • #4
        It's not clear to me what you're after with asreg.

        Are you wanting to regress each treated (individually) on the controls?

        If xtreg gives you what you want, why not use that?

        Comment

        Working...
        X