<p>You can use <code>mark</code>. For example, if the treatment was done in the year 2000, and your time variable is called <code>time</code>, the syntax is</p>

<p><code>mark treatment if time &gt;= 2000 &amp; time &lt;.</code></p>

<p>where <code>treatment</code> is the dummy that is generated.</p>

CC BY-SA 4.0
2019-04-25T15:26:08.817Z
2019-04-25T15:26:08.817Z
ahorn
<p>I have a difference-in-differences analysis. My treatment is at the county level. Each county received the treatment at a certain point in time. </p>

<p>I want to proceed with a propensity score matching as an extension to get DiD-matching results . I know everything about PSM, however, I am not quite sure how to get the STATA command in order to:</p>

<ol>
<li>Generate Pre- and Post-treatment dummies since I don't have a
treatment at one point in time; i.e. DD is staggered.</li>
<li>Use the DD with <a href="https://www.stata-journal.com/sjpdf.html?articlenum=st0026" rel="nofollow noreferrer">pscore</a></li>
</ol>

CC BY-SA 4.0
2019-04-25T15:22:34.093Z
What is the name of the time variable, and what range of values does it take on? Which year or month is the treatment done in?
ahorn
<econometrics><stata>
Difference-in-differences Matching
Ali Taleb
# Difference-in-differences Matching

(Asked by: username_0 on 2019-04-24)

I have a difference-in-differences analysis. My treatment is at the county level. Each county received the treatment at a certain point in time.

I want to proceed with a propensity score matching as an extension to get DiD-matching results . I know everything about PSM, however, I am not quite sure how to get the STATA command in order to:

1. Generate Pre- and Post-treatment dummies since I don't have a
   treatment at one point in time; i.e. DD is staggered.
2. Use the DD with [pscore](https://www.stata-journal.com/sjpdf.html?articlenum=st0026)

**Tags:** econometrics, stata

> **Comments:**
> **username_1**: What is the name of the time variable, and what range of values does it take on? Which year or month is the treatment done in?  

---

## 1 answers

### Answer by username_1 on 2019-04-25. Score: 1

You can use `mark`. For example, if the treatment was done in the year 2000, and your time variable is called `time`, the syntax is

`mark treatment if time >= 2000 & time <.`

where `treatment` is the dummy that is generated.


---

