<p><strong>A</strong></p>

<p>OP's second expression corresponds to
<span class="math-container">$$\Delta p = P(Y=1|D=1,X=\bar{X}) - P(Y=1|D=0,X=\bar{X}),$$</span>
which is
<span class="math-container">$$
\Delta p = \Lambda(\beta_0 + \beta_1 + \beta_2 \bar{X}) - \Lambda(\beta_0 + \beta_2 \bar{X}),
$$</span>
where <span class="math-container">$\Lambda(z) = e^z/(1+e^z)$</span>.</p>

<p><strong>Rationale for dividing by p</strong></p>

<p>OP's first expression corresponds to <span class="math-container">$(\Delta p)/p$</span>, where <span class="math-container">$p$</span> is the proportion of 1's in the sample <span class="math-container">$P(Y=1)$</span>. This expresses the MEA <span class="math-container">$\Delta p$</span> as a ratio to <span class="math-container">$p$</span>. This is informative as it lets us have better ideas on how large <span class="math-container">$\Delta p$</span> is. (For example, if we just have <span class="math-container">$\Delta p=0.01$</span>, we don't know how large it is. But if <span class="math-container">$p=0.02$</span> is also given, then we know <span class="math-container">$\Delta p=0.01$</span> is a quite large effect as it is 50% of <span class="math-container">$p$</span>.) One might call it "MEA as a ratio to Y-bar". Anyway, MEA usually refers to <span class="math-container">$\Delta p$</span>, but if you mean <span class="math-container">$(\Delta p)/p$</span> by it, it should be OK as long as you explain it.</p>

<p><strong>B</strong></p>

<p>The MEA associated with <span class="math-container">$D$</span> can also mean <span class="math-container">$\dot{p}=\partial P(Y=1|D=\bar{D},X=\bar{X})/\partial \bar{D}$</span>. As
<span class="math-container">$$P(Y=1|D=\bar{D},X=\bar{X}) = \Lambda(\beta_0+\beta_1 \bar{D} + \beta_2 \bar{X})$$</span>
for your logit model, we have
<span class="math-container">$$\dot{p} = \frac{\partial \Lambda(\beta_0+\beta_1 \bar{D} + \beta_2 \bar{X})}{\partial \bar{D}} = \beta_1 \lambda(\beta_0 + \beta_1 \bar{D} + \beta_2 \bar{X}),$$</span>
where <span class="math-container">$\lambda(z) = \Lambda'(z) = e^z / (1+e^z)^2$</span>. Note that <span class="math-container">$D$</span> is binary but <span class="math-container">$\bar{D}$</span> is continuous so differentiation with respect to <span class="math-container">$\bar{D}$</span> makes sense. <span class="math-container">$\Delta p$</span> and <span class="math-container">$\dot{p}$</span> have different interpretations. I personally think <span class="math-container">$\Delta p$</span> in Part A is easier to understand as the notion of <span class="math-container">$P(Y=1|D=\bar{D}, X=\bar{X})$</span> is a bit awkward.</p>

CC BY-SA 4.0
2019-12-31T03:47:33.073Z
2019-12-31T03:47:33.073Z
chan1142
<p>I am estimating the following logistic regression (binomial family) by maximum likelihood:  </p>

<p><span class="math-container">$$ \ln\left(\frac{Y}{1-Y}\right) = \beta_{0} + \beta_{1}D + \beta_{2}X + \epsilon$$</span>  </p>

<p>where D is a dummy. I am interested in the marginal effect at the mean of <span class="math-container">$D$</span>, i.e. <span class="math-container">$\beta_{1}$</span> is of interest. What does the marginal effect at the mean look like in equation form? Would it be:</p>

<p><span class="math-container">$$ \frac{1}{\bar{Y}} \left(\frac{e^{\beta_{0}+\beta_{1}+\beta_{2}\bar{X}}}{1+e^{\beta_{0}+\beta_{1}+\beta_{2}\bar{X}}} - \frac{e^{\beta_{0}+\beta_{2}\bar{X}}}{1+e^{\beta_{0}+\beta_{2}\bar{X}}}\right) $$</span></p>

<p>or</p>

<p><span class="math-container">$$\left(\frac{e^{\beta_{0}+\beta_{1}+\beta_{2}\bar{X}}}{1+e^{\beta_{0}+\beta_{1}+\beta_{2}\bar{X}}} - \frac{e^{\beta_{0}+\beta_{2}\bar{X}}}{1+e^{\beta_{0}+\beta_{2}\bar{X}}}\right) $$</span> </p>

<p>My intuition is that Y corresponds to the probability of the event occurring, and the e/(1+e) terms also correspond to the probability of the event occurring, but at specific values of Y. What would the rationale for dividing by <span class="math-container">$\bar{Y}$</span> be? Thank you.</p>

CC BY-SA 4.0
2019-12-29T10:41:31.340Z
despite its interest to economists, this question is likely to attract more answers at the Stats StackExchange (https://stats.stackexchange.com/)
emeryville
CC BY-SA 4.0
2020-01-30T07:34:55.057Z
The marginal effect of $D$ on which indicator? What is $Y$? Is it really "the probability of the event occurring"? You should indicate the "LHS" function whose variations you want to measure after a change of $D$ by one unit.
Bertrand
<econometrics><regression><statistics>
Logistic regression: Equation for marginal effect at the mean
rchng
# Logistic regression: Equation for marginal effect at the mean

(Asked by: username_0 on 2019-12-29)

I am estimating the following logistic regression (binomial family) by maximum likelihood:

$$ \ln\left(\frac{Y}{1-Y}\right) = \beta\_{0} + \beta\_{1}D + \beta\_{2}X + \epsilon$$

where D is a dummy. I am interested in the marginal effect at the mean of $D$, i.e. $\beta\_{1}$ is of interest. What does the marginal effect at the mean look like in equation form? Would it be:

$$ \frac{1}{\bar{Y}} \left(\frac{e^{\beta\_{0}+\beta\_{1}+\beta\_{2}\bar{X}}}{1+e^{\beta\_{0}+\beta\_{1}+\beta\_{2}\bar{X}}} - \frac{e^{\beta\_{0}+\beta\_{2}\bar{X}}}{1+e^{\beta\_{0}+\beta\_{2}\bar{X}}}\right) $$

or

$$\left(\frac{e^{\beta\_{0}+\beta\_{1}+\beta\_{2}\bar{X}}}{1+e^{\beta\_{0}+\beta\_{1}+\beta\_{2}\bar{X}}} - \frac{e^{\beta\_{0}+\beta\_{2}\bar{X}}}{1+e^{\beta\_{0}+\beta\_{2}\bar{X}}}\right) $$

My intuition is that Y corresponds to the probability of the event occurring, and the e/(1+e) terms also correspond to the probability of the event occurring, but at specific values of Y. What would the rationale for dividing by $\bar{Y}$ be? Thank you.

**Tags:** econometrics, regression, statistics

> **Comments:**
> **username_1**: despite its interest to economists, this question is likely to attract more answers at the Stats StackExchange (https://stats.stackexchange.com/)  
> **username_2**: The marginal effect of $D$ on which indicator? What is $Y$? Is it really "the probability of the event occurring"? You should indicate the "LHS" function whose variations you want to measure after a change of $D$ by one unit.  

---

## 1 answers

### Answer by username_3 on 2019-12-31. Score: 1

**A**

OP's second expression corresponds to
$$\Delta p = P(Y=1|D=1,X=\bar{X}) - P(Y=1|D=0,X=\bar{X}),$$
which is
$$
\Delta p = \Lambda(\beta\_0 + \beta\_1 + \beta\_2 \bar{X}) - \Lambda(\beta\_0 + \beta\_2 \bar{X}),
$$
where $\Lambda(z) = e^z/(1+e^z)$.

**Rationale for dividing by p**

OP's first expression corresponds to $(\Delta p)/p$, where $p$ is the proportion of 1's in the sample $P(Y=1)$. This expresses the MEA $\Delta p$ as a ratio to $p$. This is informative as it lets us have better ideas on how large $\Delta p$ is. (For example, if we just have $\Delta p=0.01$, we don't know how large it is. But if $p=0.02$ is also given, then we know $\Delta p=0.01$ is a quite large effect as it is 50% of $p$.) One might call it "MEA as a ratio to Y-bar". Anyway, MEA usually refers to $\Delta p$, but if you mean $(\Delta p)/p$ by it, it should be OK as long as you explain it.

**B**

The MEA associated with $D$ can also mean $\dot{p}=\partial P(Y=1|D=\bar{D},X=\bar{X})/\partial \bar{D}$. As
$$P(Y=1|D=\bar{D},X=\bar{X}) = \Lambda(\beta\_0+\beta\_1 \bar{D} + \beta\_2 \bar{X})$$
for your logit model, we have
$$\dot{p} = \frac{\partial \Lambda(\beta\_0+\beta\_1 \bar{D} + \beta\_2 \bar{X})}{\partial \bar{D}} = \beta\_1 \lambda(\beta\_0 + \beta\_1 \bar{D} + \beta\_2 \bar{X}),$$
where $\lambda(z) = \Lambda'(z) = e^z / (1+e^z)^2$. Note that $D$ is binary but $\bar{D}$ is continuous so differentiation with respect to $\bar{D}$ makes sense. $\Delta p$ and $\dot{p}$ have different interpretations. I personally think $\Delta p$ in Part A is easier to understand as the notion of $P(Y=1|D=\bar{D}, X=\bar{X})$ is a bit awkward.


---

