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
Related Posts with Diff-in-Diff
Merging survey data same variables in two separate files with different structureHello Members, I would like to seek your help on problem encountered in attempting to merge file co…
Clustered Standard Errors in HeckprobitI am running a heckprobit for selection and clustering the standard errors at the state level. I am …
Country and time fixed effectsHello everyone! I am pretty much new to Stata and wanted ask pretty simple questions that confuse m…
Summing across variables if observation equals a certain valueHi! I have the following data set (example seen below) - it contains 66 variables: 8 of these are h…
row means different?s …
Subscribe to:
Post Comments (Atom)
0 Response to Diff-in-Diff
Post a Comment