<p>If you have a time-constant covariate <span class="math-container">$X$</span>, you could include it but drop the individual fixed effects <span class="math-container">$\sigma_i$</span>. (There could be perfect multicollinearity if you kept them.) Since you mentioned that <span class="math-container">$X$</span> might have a moderating effect w.r.t. <span class="math-container">$Z$</span>, you would include interaction terms between <span class="math-container">$X$</span> and <span class="math-container">$Z$</span>. So you would have something like
<span class="math-container">$$
O_{i,t} = \alpha + \beta_t + \gamma x_i + \delta Z_{i,t} + \theta (x_i\cdot Z_{i,t}) + \epsilon_{i,t}
$$</span>
with <span class="math-container">$\beta_t$</span> being time fixed effects. You could set <span class="math-container">$\beta_1=0$</span> for identification. (One more linear restriction might be needed.) From your verbal description of the problem, I am not sure what <span class="math-container">$\sum_{\substack{k=S \\ k\neq -1}}^{F}{\mu_k}$</span> is meant to represent, so I did not include it in the equation above.</p>
<p><sub>(I might be completely wrong. It has been a long while since I did anything with panel data models.)</sub></p>

CC BY-SA 4.0
2022-12-06T12:08:28.660Z
Without the individual fixed effect, it would not be a DiD anymore? I think a better approach would be to keep the individual fixed effects and run two separate estimations for the sub-samples.
Papayapap
CC BY-SA 4.0
2022-12-06T15:04:03.463Z
@Papayapap, hm, I don't know. Is that possible if $X$ and the individual effects are perfectly multicollinear? Now regarding your suggestions, how would you define the subsamples and what estimations do you have in mind?
Richard Hardy
CC BY-SA 4.0
2022-12-07T08:29:32.677Z
Marital status is binary, so we can use two sample for marital status=1 and marital status=0
Papayapap
CC BY-SA 4.0
2022-12-07T08:35:54.800Z
@Papayapap, for a binary variable like that it sounds like a good idea.
Richard Hardy
CC BY-SA 4.0
2022-11-06T10:39:09.677Z
2022-12-06T15:01:49.377Z
2022-12-06T15:01:49.377Z
Richard Hardy
<p>I am trying to estimate the impact that the onset of a medical disease has on a number of outcomes, call them <span class="math-container">$O$</span>. To do this, I am using an event study model with individual and time fixed effects...
<span class="math-container">\begin{equation}
    O_{i,t} = \alpha + \sum_{\substack{k=S \\ k\neq -1}}^{F}{\mu_k} + Z_{i,t}\delta + \sigma_i + \epsilon_{i,t}
\end{equation}</span></p>
<p>I have theoretical reason to believe that characteristics of the individual at the onset of the individual may moderate the effect of disease onset, and so I would like to explore heterogeneity in the treatment effect by this at-diagnosis characteristic. For instance, an individual's marital status at diagnosis may moderate his response following diagnosis.</p>
<p>I apologize if this is a trivial question but how can I incorporate this time invariant characteristic into a model with the individual effect? Should I simply run subsample analysis by group? And if so, what is a good strategy for dealing with continuous (but fixed) heterogeneity -- for instance, heterogeneity of income at diagnosis? Should I drop the individual fixed effect?</p>
<p>I appreciate all of your assistance and thoughts in advance.</p>

<microeconomics><econometrics><applied-econometrics><difference-in-difference>
Heterogeneity of time invariant characteristic in event study model
salve_regina
# Heterogeneity of time invariant characteristic in event study model

(Asked by: username_0 on 2022-11-04)

I am trying to estimate the impact that the onset of a medical disease has on a number of outcomes, call them $O$. To do this, I am using an event study model with individual and time fixed effects...
\begin{equation}
O\_{i,t} = \alpha + \sum\_{\substack{k=S \\ k\neq -1}}^{F}{\mu\_k} + Z\_{i,t}\delta + \sigma\_i + \epsilon\_{i,t}
\end{equation}

I have theoretical reason to believe that characteristics of the individual at the onset of the individual may moderate the effect of disease onset, and so I would like to explore heterogeneity in the treatment effect by this at-diagnosis characteristic. For instance, an individual's marital status at diagnosis may moderate his response following diagnosis.

I apologize if this is a trivial question but how can I incorporate this time invariant characteristic into a model with the individual effect? Should I simply run subsample analysis by group? And if so, what is a good strategy for dealing with continuous (but fixed) heterogeneity -- for instance, heterogeneity of income at diagnosis? Should I drop the individual fixed effect?

I appreciate all of your assistance and thoughts in advance.

**Tags:** microeconomics, econometrics, applied-econometrics, difference-in-difference

---

## 1 answers

### Answer by username_1 on 2022-11-06. Score: 1

If you have a time-constant covariate $X$, you could include it but drop the individual fixed effects $\sigma\_i$. (There could be perfect multicollinearity if you kept them.) Since you mentioned that $X$ might have a moderating effect w.r.t. $Z$, you would include interaction terms between $X$ and $Z$. So you would have something like
$$
O\_{i,t} = \alpha + \beta\_t + \gamma x\_i + \delta Z\_{i,t} + \theta (x\_i\cdot Z\_{i,t}) + \epsilon\_{i,t}
$$
with $\beta\_t$ being time fixed effects. You could set $\beta\_1=0$ for identification. (One more linear restriction might be needed.) From your verbal description of the problem, I am not sure what $\sum\_{\substack{k=S \\ k\neq -1}}^{F}{\mu\_k}$ is meant to represent, so I did not include it in the equation above.

(I might be completely wrong. It has been a long while since I did anything with panel data models.)

> **Comments:**
> **username_2**: Without the individual fixed effect, it would not be a DiD anymore? I think a better approach would be to keep the individual fixed effects and run two separate estimations for the sub-samples.  
> **username_1**: @Papayapap, hm, I don't know. Is that possible if $X$ and the individual effects are perfectly multicollinear? Now regarding your suggestions, how would you define the subsamples and what estimations do you have in mind?  
> **username_2**: Marital status is binary, so we can use two sample for marital status=1 and marital status=0  
> **username_1**: @Papayapap, for a binary variable like that it sounds like a good idea.  

---

