Announcement

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

  • Difference - in -Difference Regression with Panel Data

    Hi, I am new here and fairly new to stata and all of statistics. As I am currently writing my master thesis, I have to use stata to analyze a conducted field experiment. During the experiment, I implemented a treatment in one treatment group and had one control group to account for the difference. Now I have a panel data set consisting of 137 individuums divided up into 2 groups and have four entries for four different time stamps (in my case I tracked performance in one task on a monthly basis meaning that I have the performance of each individuum in that task over a time horizon of 4 months).

    I used xtset ID Month for setting up my panel data in stata (ID is describes all 147 individuums and Month goes from 1 to 4 for the four months)

    I then used the xtdidregress functions for panel data with fixed effects. To use that function I created a dummy variable for all observations that occurred in month 4 (because that's when the treatment was implemented) and that was part of the treatment group. Meaning all observations that were treated and that occurred in month 4 are assigned with a one, and all other observations are assigned with a 0.

    I then ran the command:

    xtdidregres (Invoicing) (Treated Dummy), group(TreatmentGroup) time(Month)

    With Invoicing being the name of the variable that I tried to affect with my treatment, TreatedDummy being the described dummy variable for all observations in month 4 that were treated and TreatmentGroup being the variable that describes whether the observation was part of the control group (=1) or the treatment group (=2). Month is my time variable that has values between 1 and 4.

    I then tried to run a granger test with:

    estat granger

    The result I got is;

    Granger causality test
    H0: No effect in anticipation of treatment

    F(0, 1) = .
    Prob > F = .

    Can anybody explain what this is supposed to mean? Why do I not get any results but no error code? I get the same result when I try doing parallel trend analysis with estat ptrends.

    from what I have I have written here, can anybody tell if my dif-in-dif command is wrong so that the test can not be done? The estat trendplots command worked without any problems and looks correct.

    Thank you for any help!

    Cheers

    Felix
Working...
X