<blockquote>
<p>Is it enough to require not having a clear trend in period previous to test in the difference between both groups? Or should I also need that the groups move in parallel?</p>
</blockquote>
<p>Technically, the assumption is that they move in parallel. Of course, practically you will have small random deviations, so practically it boils to not having significant trend present.</p>
<p>However, you should also make sure the trend is properly specified since trend does not necessarily need to be linear. Moreover, if you have small number of time periods, it might be better just to visually inspect the y(test)-y(control). The reason for this is that with small number of time periods your tests will have low power. I mean p&gt;0.9 is pretty high, but if you have just like 5 time periods then such test does not make sense.</p>
<blockquote>
<p>Checking that the zones are cointegrated is necessary or even sufficient?</p>
</blockquote>
<p>This is interesting idea, but I do not believe it would work because when we talk about cointegration we think of long run trend between two related variables (e.g. between two exchange rate levels). Why would y(treated) be a function of y(controlled)?</p>

CC BY-SA 4.0
2023-10-05T09:46:46.763Z
Simulating the data with a sinusoidal trend the p-value increases vs the linear trend. I guess this boils down to the formula of the coeff (cov(x,y)/var(x)). So it is better to have parallel lines. To check this I was doing a regression for the diff of the series in the previous period and checking that the pvalue>0.20, but that is not enough since they might cross, so I added that the variation coefficient <.3. Is there any better approach than this? Like a specific test for it? Thanks.
GabyLP
CC BY-SA 4.0
2023-10-05T09:50:37.987Z
The idea of cointegration was exactly that, in order to choose the control group we should have a long term relationship, the problem is that cointegration mean linear combination and that does not imply necessarily parallel trends.
GabyLP
CC BY-SA 4.0
2023-10-05T09:07:11.920Z
2023-10-05T09:07:11.920Z
1muflon1
<p>I'd like to use difference in difference methodology to test the impact of a treatment. Being the formula of the regression:</p>
<pre><code>y = flag_test_period + flag_test_group + flag_test_group * flag_of_test_period
</code></pre>
<p>Checking the p value of the coefficient for the last term (the combination of both flags) is less than the desired threshold (i.e 0.05) would imply that there's an impact due to the treatment.</p>
<p>What I understand from this is that choosing the control group implies (considering the method) that at least there's no clear trend of the difference of <em>y(control)</em> and <em>y(test)</em> in the period previous to test. So I was running a regression in the previous period to test like:</p>
<pre><code>y(control) - y(test) = gamma * t + alpha 
</code></pre>
<p>and checking that the gamma has p_value &gt; 0.9 (that would mean that there's no trend in the difference between both groups).</p>
<p>Questions:</p>
<ol>
<li><p>Is it enough to require <strong>not having a clear trend</strong> in period previous to test in the difference between both groups? Or should I also need that the groups move in <strong>parallel</strong>?</p>
</li>
<li><p>Checking that the zones are <strong>cointegrated</strong> is necessary or even sufficient? I guess is none, because the series might be cointegrated and the difference might have a clear trend, right?
What I understood from cointegration is that one series is a linear combination (+ error ~ N) of the other, so the series might not be parallel and want would be worse for the approach of DiD is that the <strong>difference between them has a clear trend</strong>. I guess, <strong>I could control by that</strong> (the trend in the diff) if I can identify the functional form. Would that be a good approach?</p>
</li>
</ol>
<p>Thanks.</p>

<regression><difference-in-difference><co-integration>
Difference in Difference - how to choose the control group (difference with no clear trend, parallel series or cointegrated?)
GabyLP
# Difference in Difference - how to choose the control group (difference with no clear trend, parallel series or cointegrated?)

(Asked by: username_0 on 2023-10-05)

I'd like to use difference in difference methodology to test the impact of a treatment. Being the formula of the regression:
y = flag_test_period + flag_test_group + flag_test_group * flag_of_test_period

Checking the p value of the coefficient for the last term (the combination of both flags) is less than the desired threshold (i.e 0.05) would imply that there's an impact due to the treatment.
What I understand from this is that choosing the control group implies (considering the method) that at least there's no clear trend of the difference of y(control) and y(test) in the period previous to test. So I was running a regression in the previous period to test like:
y(control) - y(test) = gamma * t + alpha 

and checking that the gamma has p_value > 0.9 (that would mean that there's no trend in the difference between both groups).
Questions:

Is it enough to require not having a clear trend in period previous to test in the difference between both groups? Or should I also need that the groups move in parallel?

Checking that the zones are cointegrated is necessary or even sufficient? I guess is none, because the series might be cointegrated and the difference might have a clear trend, right?
What I understood from cointegration is that one series is a linear combination (+ error ~ N) of the other, so the series might not be parallel and want would be worse for the approach of DiD is that the difference between them has a clear trend. I guess, I could control by that (the trend in the diff) if I can identify the functional form. Would that be a good approach?


Thanks.

**Tags:** regression, difference-in-difference, co-integration

---

## 1 answers

### Answer by username_1 on 2023-10-05. Score: 1

> Is it enough to require not having a clear trend in period previous to test in the difference between both groups? Or should I also need that the groups move in parallel?

Technically, the assumption is that they move in parallel. Of course, practically you will have small random deviations, so practically it boils to not having significant trend present.

However, you should also make sure the trend is properly specified since trend does not necessarily need to be linear. Moreover, if you have small number of time periods, it might be better just to visually inspect the y(test)-y(control). The reason for this is that with small number of time periods your tests will have low power. I mean p>0.9 is pretty high, but if you have just like 5 time periods then such test does not make sense.

> Checking that the zones are cointegrated is necessary or even sufficient?

This is interesting idea, but I do not believe it would work because when we talk about cointegration we think of long run trend between two related variables (e.g. between two exchange rate levels). Why would y(treated) be a function of y(controlled)?

> **Comments:**
> **username_0**: Simulating the data with a sinusoidal trend the p-value increases vs the linear trend. I guess this boils down to the formula of the coeff (cov(x,y)/var(x)). So it is better to have parallel lines. To check this I was doing a regression for the diff of the series in the previous period and checking that the pvalue>0.20, but that is not enough since they might cross, so I added that the variation coefficient <.3. Is there any better approach than this? Like a specific test for it? Thanks.  
> **username_0**: The idea of cointegration was exactly that, in order to choose the control group we should have a long term relationship, the problem is that cointegration mean linear combination and that does not imply necessarily parallel trends.  

---

