I am trying to do a diff-in-diff analysis on the effect of endorsement on a product. This is what my data set looks like:
dates times price YeezyShoe date_of_purchase Yandhi_Release Ye_Release Kanye_Chicago
April 2, 2019 3:55PM 128 0 21641 0 0 0
At the moment, I have these commands in order to create treatment date ranges:
gen date_of_purchase = date(dates, "MDY")
gen byte Yandhi_Release=inrange(date_of_purchase,td(29sep20 18),td(3october2018))
gen byte Ye_Release=inrange(date_of_purchase,td(01june2018) ,td(05june2018))
gen byte Kanye_Chicago=inrange(date_of_purchase,td(15august 2018), td(19august2018))
If the shoe is endorsed, YeezyShoe=1, and if the shoe is the control shoe, it is YeezyShoe=0.
This is what my current diff-in-diff regression looks like; however, I am having a hard time isolating this effect and formulating a regression.
gen treatXafter = Yandhi_Release * YeezyShoe
reg __ YeezyShoe Yandhi_Release treatXafter
0 Response to Diff-in-Diff
Post a Comment