Dear Stata forum, I am fairly new to STATA but am trying to carry out a DID analysis. I have watched some videos on Youtube and read the manual but still cannot fully understand how to set up the dataset. For context, I have carried out an experiment on campus for a class project over a period of two months. The aim of the project is to decrease the consumption of beef products. I have 1 control group (a cafe) and a treatment group (another cafe). I have data before and during the treatment. My variables include time (of the day), date, quantity of beef products sold. See below an example as to how I have coded the data so far:
Date Treatment Cafe Quantitybeef
0...........0............ 0........... 21
0.......... 0............ 0........... 25
1...........0............ 0........... etc
1...........0............ 0
0.......... 0............ 1
0...........0............ 1
1...........1.............1
1...........1.............1
I have used the stata command: didregress (Quantitybeef) (Treatment), group(Café) time(Date). However I am getting some strange results. Please could you provide some feedback on the best way to carry out a DID analysis in STATA given my context? Note, I have also tried carrying out the following code: reg Quantitybeef Treatment##Date.
Many thanks for your help.
Date Treatment Cafe Quantitybeef
0...........0............ 0........... 21
0.......... 0............ 0........... 25
1...........0............ 0........... etc
1...........0............ 0
0.......... 0............ 1
0...........0............ 1
1...........1.............1
1...........1.............1
I have used the stata command: didregress (Quantitybeef) (Treatment), group(Café) time(Date). However I am getting some strange results. Please could you provide some feedback on the best way to carry out a DID analysis in STATA given my context? Note, I have also tried carrying out the following code: reg Quantitybeef Treatment##Date.
Many thanks for your help.
Comment