<p>The main value in actually setting it up as a distinct diff in diff vs just using a dummy variable for the policy implementation is that you can do a visual check of the trajectories through time of the treated group (or treated object) and the untreated up until the date of the treatment. If the two have <em>parallel trajectories</em> before the treatment, then they represent good diff-in-diff comparisons. Researchers who work with diff in diff will always be impressed with good parallel trajectories. It means the two (or the two groups) are moving together and the time-dependent shocks are affecting the groups similarly (no group-dependent, time-dependent shocks). Then you have a vertical line on the graph showing the time of the treatment and the curves will diverge (ideally in a step fashion or delayed-step fashion, unless the treatment effect is increasing with time).</p>
<p>However, any diff in diff is technically just a regression with a dummy variable for the treatment (and dependent variable that is in a time-step where it is in the treated state has a 1 for that dummy variable on the RHS), especially if you want to get p-values.</p>
<p>In your case you have multiple changes at varying times and of varying magnitudes, so I wouldn’t think of it, nor present it, as a diif-in-diff (except maybe as below). In addition to multiple states and times for the changes, you don’t have an “on/off” type of treatment so you don’t have a dummy variable. If you want to motivate that you have good comparisons and no endogeneity issue, there is a way to use any states that had no changes during the study period and break the other states into groups to show trajectories. (I’ll mention that below). Or even create “synthetic comparisons” if you want to get real serious and read about those. A synthetic comparison state is created using weighted sums of the other states, although that is better suited for assessing the impact on a state. A famous paper to first do this used a weighted sum of comparison states to create a “synthetic California”, if you want to google that, and showed it had parallel and even out-of-sample parallel behavior compared to California but both still before the change. I dont remember the name you can probably find it.</p>
<p>The state gdp can be the LHS, and on the right you have deviation from starting sales tax rate (from starting value for that state) as a continuous variable. Also include lagged deviation (past increases in sales tax, change from one and two years prior to the state-year being considered. The other benefit is that you can include any observables in the regression.</p>
<p>So y_t = gdp for year t = a + beta*(increase in tax rate from year-zero value) + beta2*(increase of year t-1 from year-zero value) + beta3*(increase of year t-2 from year-zero value) + other stuff.</p>
<p>If you you are at a pretty high-level or even snobby university or institution that turns their nose up at “regression runners” claiming you can’t control for unobservables and don’t know if you have endogeneity issues, you can break the study period into pieces. Eg: one group had changes in years 7-10 but not 0-7 or 11-15, and one group had no increases years 0-15 (sort that way and ignore any who dont fit either group). Plot the gdp mean of each group from years 0-7 to show good comparisons (parallel trajectories) and emphasize this shows we dont have any time-dependent, group-dependent shocks that will throw off the estimates. Then add the rest of the years with years 7-10 kindve either dotted-lines for the two curves, or a greyed out band, as this is transition time. The change (hopefully a step or a lagged step) between the groups shows visually the effect of sales tax. You still do the regressions and just use the coefficients from that; all this other is just to show the coefficients are measuring what you say they are. I’ll answer any questions if Im around this might be confusing.</p>
<p>A much simpler version and way less accurate version would use states that had no sales tax, if enough exist, but you still have the problem of different years of implementation. If you had three such states you could do three totally separate diff-in-diff tests. Let me know if you have such an unlikely situation.</p>

CC BY-SA 4.0
2021-08-01T05:13:55.613Z
2021-08-01T05:25:59.897Z
2021-08-01T05:25:59.897Z
Al Brown
<p>In an attempt to evaluate a potential U.S. National Sales tax rate, it was suggested on this forum before that I consider a difference-in-differences on state sales tax rates before and after they changed.  How would I go about doing this?  Would I do a difference-in-differences on each of the states sales taxes, and then aggregate the data?  If so, how do I aggregate the data?</p>

CC BY-SA 3.0
2015-05-19T19:02:29.783Z
Sure.  @FooBar made the suggestion on this post. [link](http://economics.stackexchange.com/questions/5659/laffer-curve-regression/5665?noredirect=1#comment6583_5665)
Howsikan
CC BY-SA 3.0
2015-05-19T19:33:41.000Z
@AndréPeseur I would like to use trends in sales tax revenue for states to estimate a national sales tax.
Howsikan
CC BY-SA 3.0
2015-05-19T20:16:08.300Z
@AndréPeseur Well let me try to clarify.  My research is to develop the possibility of a U.S. Nationwide Sales tax.  To find how consumers react to sales taxes, I'm looking at per-capita revenues and tax rates of all 50 states.  I then regressed this data using a Laffer curve to find a quadratic fit.   FooBar critiqued this saying that this would only develop correlation but not causation.  He then suggested that I look into a diff-n-diff to work with.
Howsikan
CC BY-SA 3.0
2015-05-19T20:43:30.057Z
@AndréPeseur Thank you.  In FooBar's explanation, I believe he was thinking I was trying to develop a causal relationship for the Laffer curve, while I was actually just using the existing principle of the Laffer curve to quadratically model tax data.
Howsikan
CC BY-SA 3.0
2015-05-19T23:12:32.707Z
@Howsikan nope, I will have to agree with FooBar. The relevant tool is DID.
VicAche
CC BY-SA 3.0
2015-05-19T23:14:42.663Z
@VicAche May I know what the benefits of DID are compared to regression?  Also, do you have any resources that can show how to do a DID?  I haven't taken an econometrics course yet.  Thank you.
Howsikan
CC BY-SA 3.0
2015-05-19T23:17:29.307Z
@Howsikan as FooBar tried to explain you, a regression quantifies a correlation, not causality. You cannot have predictive results with causality.
VicAche
CC BY-SA 3.0
2015-05-19T23:19:00.663Z
try http://www.nber.org/WNE/lect_10_diffindiffs.pdf
VicAche
CC BY-SA 3.0
2015-05-19T23:20:07.103Z
In other words, I cannot use the regression model unless I can affirm that there is a causal relationship between tax rates and tax revenues right?  So to develop that causal relationship, I need to do a diff-n-diff?
Howsikan
CC BY-SA 3.0
2015-05-19T23:22:27.100Z
Yes, exactly. For example, take tax revenues and income. There sure is a positive correlation between both, yet you can't deduce that increasing tax revenues by decision would bring up income.
VicAche
CC BY-SA 3.0
2015-05-19T23:22:40.067Z
http://stats.stackexchange.com/questions/88409/which-test-should-be-used-to-compare-two-mean-differences may be more at your level than the link above...
VicAche
CC BY-SA 3.0
2015-05-20T11:42:03.647Z
@AndréPeseur I think you got us wrong, which is your problem, and you're getting Howsiken mistaken, which is not very nice of you. We're not saying "regression is bad and DiD is great". We're saying: regression will give you quantitative results on correlation and DiD will give you quantitative results on causality. There is not anything more to be said. The fact that any result should be discussed to provide positive results is well discussed in the paper I linked (which I don't believe you have bothered to read), which does define the limits of DiD.
VicAche
CC BY-SA 3.0
2015-05-20T11:43:29.603Z
@AndréPeseur what I ear in what you're telling Howsikan is "the studs are telling you not to walk but to use a plane to go to Mogadisco, but they haven't warned you about the fact you couldn't land a plane in your garden".
VicAche
CC BY-SA 3.0
2015-05-20T13:05:23.407Z
@AndréPeseur DiD was designed to mesure causality. If it was enough, we would get rid of scientists of all kind and put statisticians in their place. However, pretending that blind regression gives a better indication of causality than DiD is a nameless abomination. Again, please read the article I referred Howsikan to before making assumptions  on what "I believe" DiD proves or proves not.
VicAche
CC BY-SA 3.0
2015-05-20T14:09:34.363Z
Please read yourself again.
VicAche
CC BY-SA 3.0
2015-05-20T21:24:39.483Z
@AndréPeseur is correct above when he says that "Causality is not a matter of (econometric) methods, but a matter of interpretation. DiD does not give automagically 'causal' results." Angrist and Pischke differentiate the "mode of inference" from the "identification strategy." The econometric method gives you an estimate. Causal inference maps assumptions into causal statements (the identification strategy). from However, I believe Andre is incorrect when he says that "but I still believe that your regression approach is fine for your purpose." I believe this approach is quite biased.
jmbejara
CC BY-SA 3.0
2015-05-21T08:13:36.743Z
@jmbejara who claimed DiD gave "automagically" ;) causal results?
VicAche
<econometrics><taxation><optimal-taxation><difference-in-difference>
Difference-in-Differences on State Sales Tax Rates
Howsikan
# Difference-in-Differences on State Sales Tax Rates

(Asked by: username_0 on 2015-05-19)

In an attempt to evaluate a potential U.S. National Sales tax rate, it was suggested on this forum before that I consider a difference-in-differences on state sales tax rates before and after they changed. How would I go about doing this? Would I do a difference-in-differences on each of the states sales taxes, and then aggregate the data? If so, how do I aggregate the data?

**Tags:** econometrics, taxation, optimal-taxation, difference-in-difference

> **Comments:**
> **username_0**: Sure.  @FooBar made the suggestion on this post. [link](http://economics.stackexchange.com/questions/5659/laffer-curve-regression/5665?noredirect=1#comment6583_5665)  
> **username_0**: @AndréPeseur I would like to use trends in sales tax revenue for states to estimate a national sales tax.  
> **username_0**: @AndréPeseur Well let me try to clarify.  My research is to develop the possibility of a U.S. Nationwide Sales tax.  To find how consumers react to sales taxes, I'm looking at per-capita revenues and tax rates of all 50 states.  I then regressed this data using a Laffer curve to find a quadratic fit.   FooBar critiqued this saying that this would only develop correlation but not causation.  He then suggested that I look into a diff-n-diff to work with.  
> **username_0**: @AndréPeseur Thank you.  In FooBar's explanation, I believe he was thinking I was trying to develop a causal relationship for the Laffer curve, while I was actually just using the existing principle of the Laffer curve to quadratically model tax data.  
> **username_1**: @username_0 nope, I will have to agree with FooBar. The relevant tool is DID.  
> **username_0**: @username_1 May I know what the benefits of DID are compared to regression?  Also, do you have any resources that can show how to do a DID?  I haven't taken an econometrics course yet.  Thank you.  
> **username_1**: @username_0 as FooBar tried to explain you, a regression quantifies a correlation, not causality. You cannot have predictive results with causality.  
> **username_1**: try http://www.nber.org/WNE/lect_10_diffindiffs.pdf  
> **username_0**: In other words, I cannot use the regression model unless I can affirm that there is a causal relationship between tax rates and tax revenues right?  So to develop that causal relationship, I need to do a diff-n-diff?  
> **username_1**: Yes, exactly. For example, take tax revenues and income. There sure is a positive correlation between both, yet you can't deduce that increasing tax revenues by decision would bring up income.  
> **username_1**: http://stats.stackexchange.com/questions/88409/which-test-should-be-used-to-compare-two-mean-differences may be more at your level than the link above...  
> **username_1**: @AndréPeseur I think you got us wrong, which is your problem, and you're getting Howsiken mistaken, which is not very nice of you. We're not saying "regression is bad and DiD is great". We're saying: regression will give you quantitative results on correlation and DiD will give you quantitative results on causality. There is not anything more to be said. The fact that any result should be discussed to provide positive results is well discussed in the paper I linked (which I don't believe you have bothered to read), which does define the limits of DiD.  
> **username_1**: @AndréPeseur what I ear in what you're telling username_0 is "the studs are telling you not to walk but to use a plane to go to Mogadisco, but they haven't warned you about the fact you couldn't land a plane in your garden".  
> **username_1**: @AndréPeseur DiD was designed to mesure causality. If it was enough, we would get rid of scientists of all kind and put statisticians in their place. However, pretending that blind regression gives a better indication of causality than DiD is a nameless abomination. Again, please read the article I referred username_0 to before making assumptions  on what "I believe" DiD proves or proves not.  
> **username_1**: Please read yourself again.  
> **username_2**: @AndréPeseur is correct above when he says that "Causality is not a matter of (econometric) methods, but a matter of interpretation. DiD does not give automagically 'causal' results." Angrist and Pischke differentiate the "mode of inference" from the "identification strategy." The econometric method gives you an estimate. Causal inference maps assumptions into causal statements (the identification strategy). from However, I believe Andre is incorrect when he says that "but I still believe that your regression approach is fine for your purpose." I believe this approach is quite biased.  
> **username_1**: @username_2 who claimed DiD gave "automagically" ;) causal results?  

---

## 1 answers

### Answer by username_3 on 2021-08-01. Score: 1

The main value in actually setting it up as a distinct diff in diff vs just using a dummy variable for the policy implementation is that you can do a visual check of the trajectories through time of the treated group (or treated object) and the untreated up until the date of the treatment. If the two have *parallel trajectories* before the treatment, then they represent good diff-in-diff comparisons. Researchers who work with diff in diff will always be impressed with good parallel trajectories. It means the two (or the two groups) are moving together and the time-dependent shocks are affecting the groups similarly (no group-dependent, time-dependent shocks). Then you have a vertical line on the graph showing the time of the treatment and the curves will diverge (ideally in a step fashion or delayed-step fashion, unless the treatment effect is increasing with time).

However, any diff in diff is technically just a regression with a dummy variable for the treatment (and dependent variable that is in a time-step where it is in the treated state has a 1 for that dummy variable on the RHS), especially if you want to get p-values.

In your case you have multiple changes at varying times and of varying magnitudes, so I wouldn’t think of it, nor present it, as a diif-in-diff (except maybe as below). In addition to multiple states and times for the changes, you don’t have an “on/off” type of treatment so you don’t have a dummy variable. If you want to motivate that you have good comparisons and no endogeneity issue, there is a way to use any states that had no changes during the study period and break the other states into groups to show trajectories. (I’ll mention that below). Or even create “synthetic comparisons” if you want to get real serious and read about those. A synthetic comparison state is created using weighted sums of the other states, although that is better suited for assessing the impact on a state. A famous paper to first do this used a weighted sum of comparison states to create a “synthetic California”, if you want to google that, and showed it had parallel and even out-of-sample parallel behavior compared to California but both still before the change. I dont remember the name you can probably find it.

The state gdp can be the LHS, and on the right you have deviation from starting sales tax rate (from starting value for that state) as a continuous variable. Also include lagged deviation (past increases in sales tax, change from one and two years prior to the state-year being considered. The other benefit is that you can include any observables in the regression.

So y\_t = gdp for year t = a + beta\*(increase in tax rate from year-zero value) + beta2\*(increase of year t-1 from year-zero value) + beta3\*(increase of year t-2 from year-zero value) + other stuff.

If you you are at a pretty high-level or even snobby university or institution that turns their nose up at “regression runners” claiming you can’t control for unobservables and don’t know if you have endogeneity issues, you can break the study period into pieces. Eg: one group had changes in years 7-10 but not 0-7 or 11-15, and one group had no increases years 0-15 (sort that way and ignore any who dont fit either group). Plot the gdp mean of each group from years 0-7 to show good comparisons (parallel trajectories) and emphasize this shows we dont have any time-dependent, group-dependent shocks that will throw off the estimates. Then add the rest of the years with years 7-10 kindve either dotted-lines for the two curves, or a greyed out band, as this is transition time. The change (hopefully a step or a lagged step) between the groups shows visually the effect of sales tax. You still do the regressions and just use the coefficients from that; all this other is just to show the coefficients are measuring what you say they are. I’ll answer any questions if Im around this might be confusing.

A much simpler version and way less accurate version would use states that had no sales tax, if enough exist, but you still have the problem of different years of implementation. If you had three such states you could do three totally separate diff-in-diff tests. Let me know if you have such an unlikely situation.


---

