Announcement

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

  • help figuring out staggered diff in diff approach

    Hi everyone, I have the following individual level county specific data where the treatment timing (impact_var) is different for each county. I looked into all other staggered diff in diff works and see that the treatment-control groups are mostly the ones that are treated vs ones never treated. However, my treatment control group is person with a car vs without a car. Since, this is not a balanced panel data, how should i go ahead and work on this? I tried to use bacon decompostion for dynamic diff-in-diff since TWFE would be biased.

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input byte p_id str1 county byte(month impact_month) str4 treatment_group double(outcome_var independent_var)
     1 "A" 1 3 "yes"     .2818808067933959    .5450594150323939
     2 "A" 1 3 "yes "    .9858339825468566    .4364299307352397
     3 "A" 1 3 "no"     .36669659003416266   .38070007081074986
     4 "A" 2 3 "yes"     .9599754006051351   .23211071912605896
     5 "A" 2 3 "no"      .7269755119894432   .19319421084816424
     6 "A" 2 3 "yes"    .07200209144556657    .1220095844198803
     7 "A" 3 3 "yes "    .5222588470002206   .04927778451415121
     8 "A" 3 3 "no"       .938889658355819     .756989449156155
     9 "A" 3 3 "yes"    .42793845007400344   .19642315958868828
    10 "A" 4 3 "no"     .19945284541894082    .7335298074692761
    11 "A" 4 3 "yes"    .22535759725413773   .26281918916732794
    12 "A" 4 3 "yes "    .5587509514416281    .0266742110158662
    13 "A" 4 3 "no"      .3658689030561856  .006432138747697436
    14 "A" 5 3 "yes"    .17700557681618667    .5603036207919811
    15 "A" 5 3 "no"     .10175744793298713   .18897232268140918
    16 "B" 1 4 "yes"     .6827773649754435     .953212011491134
    17 "B" 2 4 "yes "    .5197893392463795    .6664544382994466
    18 "B" 2 4 "no"      .5665108450502471    .7879986394463855
    19 "B" 2 4 "yes"     .5961963389772857    .7756572374966352
    20 "B" 3 4 "no"      .6016621668323542   .28828214954403764
    21 "B" 3 4 "yes"     .9974930757877027  .021347942986916446
    22 "B" 3 4 "yes "     .770227190975668    .1251575702794766
    23 "B" 3 4 "no"      .8908138051083169    .9102775602146674
    24 "B" 4 4 "yes"      .383870890932669 .0035538227297660097
    25 "B" 4 4 "no"      .9302803614124064    .9931037783949731
    26 "B" 5 4 "yes"     .6576135117831666    .2897146688657347
    27 "B" 5 4 "yes "    .6256040852611076    .9142197891452521
    28 "B" 5 4 "no"       .565560541049187   .21480041898494262
    29 "C" 1 2 "yes"     .5567823401919891    .6970189692640844
    30 "C" 1 2 "no"     .36619044171717163    .5423322552225732
    31 "C" 1 2 "yes"     .7604414752187605   .49058875645844036
    32 "C" 2 2 "yes "    .7615769687477215    .2287253051380156
    33 "C" 2 2 "no"     .39419862186235843    .3002463105850113
    34 "C" 2 2 "yes"    .03766309563771841    .6900612586102638
    35 "C" 3 2 "no"      .7568439386219061    .5244691113833923
    36 "C" 3 2 "yes"    .25950729400661476    .3301759292372449
    37 "C" 3 2 "yes "     .919434161989217    .6193096109447961
    38 "C" 3 2 "no"   .0011197131419192763    .5076571923195543
    39 "C" 4 2 "yes"     .5118936905829388     .612023659479903
    40 "D" 1 3 "no"     .07318737222495586    .6710930223872101
    41 "D" 1 3 "yes"     .2760449116068029   .03876267026640723
    42 "D" 2 3 "yes "   .33175932522160057    .4551023584127033
    43 "D" 2 3 "no"      .6937891021905837   .04280899860249976
    44 "D" 3 3 "yes"     .5057506478105401    .6048876852207012
    45 "D" 3 3 "no"     .43011710709497797      .95899535062922
    46 "D" 3 3 "yes"     .5864184475254749    .3887734936559192
    47 "D" 3 3 "yes "    .7972303146475893   .25916563551309313
    48 "D" 4 3 "no"      .3466640603313965   .42782844617665405
    49 "D" 5 3 "yes"     .4617208076611288   .47396866184440867
    50 "D" 6 3 "no"      .8865065672187957    .7471843894867372
    end
Working...
X