I am estimating an equation
\[
Y_{ist} = \alpha D_{ist} + \beta \cdot x_{ist} + \gamma_s + \lambda_t + \delta_i + \varepsilon_{ist},
\]
where ist denotes individual, state and time. I am estimating it with
The macro `xx' is a list of covariates. I am now trying to get the mean prediction but setting D to zero:
\[
\mathbb{E}[Y_{ist} \mid D_{ist} = 0]
\]
I want to prediction to include the effects \delta_i. Notice that margins, at(D = 0) gives me the mean prediction without the effects \delta_i.
\[
Y_{ist} = \alpha D_{ist} + \beta \cdot x_{ist} + \gamma_s + \lambda_t + \delta_i + \varepsilon_{ist},
\]
where ist denotes individual, state and time. I am estimating it with
Code:
xtset i t xtreg Y D `xx' i.s i.t, fe
\[
\mathbb{E}[Y_{ist} \mid D_{ist} = 0]
\]
I want to prediction to include the effects \delta_i. Notice that margins, at(D = 0) gives me the mean prediction without the effects \delta_i.
Comment