Most textbooks and texts in blogs like to provide example of diff-in-diff using 4 datapoints. It's almost always an example with two cities, an intervention in one of them and then the calculation of the effect is:
Effect = (Treated after - Treatment before) - (Control after - Control before) I think it's intuitive, but 'Treated after' is the city after the intervention and 'Treatment before' is the city with the intervention before the intervention. So let's say we want to evaluate the effect of a policy in the murder rate. Let's say the city with the new policy started with 10 deaths and after the policy implementation the deaths decreased to 5. The city with no intervention started with 15 and after the same period it ended with 10 deaths. The calculation would be something like this:
Effect = (10-5)-(15-10) = 5-5 = 0 The policy didn't have any effect. I know we usually control for other covariates and do a regression, but let's not consider this at first. Now, let's say we have not 2 cities, but 10, where 3 had an intervention and 7 didn't have any. How will the calculation be? I mean, we can't do the same thing because we have more cities in the control group. We would get the mean of the change in deaths? What if we had some seasonality? Do we consider this by using something in a regression? I'm kind of confused on how to get the examples with 4 datapoints and go up to lots of datapoints.