I am struggling in understanding and analysing my data with the diff function & I hope you will be able to help me.
the goal of my study is to see whether a marketing campaign can reduce fare evasion in public transportation. Let me explain how my data looks like: I have two cities in which I compare the fare evasion rates after an intervention aimed at decreasing fare evasion. the intervention only occurs in a city (treatment) but not in the other (control). so we assessed fare evasion rates before and after the intervention in both cities. I collected the data in two waves to increase the power of the study
The fare evasion variable is a binary with 0 = the passenger has a valid ticket & 1= the passenger was travelling with no ticket or no valid ticket.
The treatment variable is also a binary one with 0 = control and 1 = treatment
The time variable is binary 0=before the intervention & 1=after the intervention.
My problem is the following: I observe a significant decrease in fare evasion rates when I do statistical analyses (chi square tests) but if I perform the following code the difference in difference is non significant:
diff fareevasion if wave==1, t(treatment) p(time)
As I am running the analysis using only binary variables I guess there is a severe problem of collinearity. So my question is: How can I conduct the difference in difference analysis when I only have binary variables?
Thanks a lot for your answers and have a nice day
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte(fareevasion treatment time wave) float _diff 1 1 0 2 0 0 0 0 2 0 0 0 0 1 0 1 0 0 2 0 0 0 0 1 0 0 1 0 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 1 0 0 1 0 2 0 0 1 0 1 0 0 1 0 2 0 0 1 0 1 0 0 0 0 2 0 0 0 0 2 0 0 0 0 2 0 0 0 0 2 0 0 0 0 2 0 0 1 0 1 0 0 0 0 2 0 0 1 0 1 0 0 0 0 2 0 0 0 0 1 0 0 1 0 2 0 0 1 0 1 0 1 0 0 2 0 0 1 0 2 0 0 0 0 2 0 0 0 0 2 0 0 0 0 1 0 0 1 0 2 0 0 0 0 2 0 0 0 0 2 0 0 0 0 2 0 0 0 0 2 0 0 0 0 2 0 0 0 0 2 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 2 0 0 1 0 2 0 0 0 0 2 0 0 0 0 2 0 0 1 0 2 0 0 0 0 2 0 0 1 0 2 0 0 1 0 1 0 0 0 0 2 0 0 0 0 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0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