9
$\begingroup$

In the logisitic regression chapter of "Data Analysis Using Regression and Multilevel/Hierarchical Models" by Gelman and Hill, The "Divide by 4" rule is presented to approximate average marginal effects.

"Divide by 4 rule"

Essentially, dividing the estimated log-odds ratio gives the maximum slope (or the maximum change in probabilities) of the logistic function. Logistic function

Since the text above states that the "divide by 4 rule" gives the maximum change in $P(y=1)$ with a unit change in x, why is the estimated 8% less than the 13% calculated from actually taking the derivative of the logistic function in the example given?

Does the "divide by 4 rule" actually give the upper bound marginal effect?

Other "divide by 4" resources:

$\endgroup$
8
  • 1
    $\begingroup$ Your question seems to come down to asking why the maximum slope of the logistic function occurs at $x=0.$ Is that really what you are after? $\endgroup$
    – whuber
    Jul 3, 2019 at 19:11
  • $\begingroup$ @whuber I think they understand that part... I think they are asking why the estimated maximum marginal effect is beta/4 = 0.08 yet the text suggests that the actual derivative = 0.13. $\endgroup$
    – Emma Jean
    Jul 3, 2019 at 19:14
  • $\begingroup$ @whuber I guess I'm trying to reconcile the explanation with the example in the text. It looks like the number given by the rule of 4 (8%) is not the maximum because it is smaller than the 13% calculated by taking the derivative. $\endgroup$ Jul 3, 2019 at 19:15
  • $\begingroup$ Isn't that the very meaning of maximum: everything else is smaller?? $\endgroup$
    – whuber
    Jul 3, 2019 at 19:40
  • 1
    $\begingroup$ I see what you are saying--I misread the quotation. $\endgroup$
    – whuber
    Jul 3, 2019 at 21:36

2 Answers 2

9
$\begingroup$

I think it's a typo.

The derivative of the logistic curve with respect to $x$ is: $$ \frac{\beta\mathrm{e}^{\alpha + \beta x}}{\left(1 + \mathrm{e}^{\alpha + \beta x}\right)^{2}} $$

So for their example where $\alpha = -1.40, \beta = 0.33$ it is: $$ \frac{0.33\mathrm{e}^{-1.40 + 0.33 x}}{\left(1 + \mathrm{e}^{-1.40 + 0.33 x}\right)^{2}} $$ Evaluated at the mean $\bar{x}=3.1$ gives: $$ \frac{0.33\mathrm{e}^{-1.40 + 0.33 \cdot 3.1}}{\left(1 + \mathrm{e}^{-1.40 + 0.33\cdot 3.1}\right)^{2}} = 0.0796367 $$ This result is very close to the maximum slope of $0.33/4 = 0.0825$ which is attained at $x=-\frac{\alpha}{\beta}=4.24$, supporting their claim.

On page 82, they write

GelmanHill

But $0.33\mathrm{e}^{-0.39}/\left(1+\mathrm{e}^{-0.39}\right)^{2}\neq 0.13$. Instead, it's around $0.08$, as shown above.

$\endgroup$
1
  • 1
    $\begingroup$ Cool. I think you're right. That makes a lot more sense. I wonder if it has been corrected in a newer edition. $\endgroup$ Jul 8, 2019 at 19:57
5
$\begingroup$

For a continuous variable $x$, the marginal effect of $x$ in a logit model is

$$\Lambda(\alpha + \beta x)\cdot \left[1-\Lambda(\alpha + \beta x)\right]\cdot\beta = p \cdot (1 - p) \cdot \beta,$$ where the inverse logit function $\Lambda$ is $$\Lambda(z)=\frac{\exp{z}}{1+\exp{z}}.$$

Here $p$ is a probability, so the factor $p\cdot (1-p)$ is maximized when $p=0.5$ at $0.25$, which is where the $\frac{1}{4}$ comes from. Multiplying by the coefficient gives you the upper bound on the marginal effect. Here it is

$$0.25\cdot0.33 =0.0825.$$

Calculating the marginal effect at the mean income yields,

$$\mathbf{invlogit}(-1.40 + 0.33 \cdot 3.1)\cdot \left(1-\mathbf{invlogit}(-1.40 + 0.33 \cdot3.1)\right)\cdot 0.33 = 0.07963666$$

These are pretty close, with the approximate maximum marginal effect bounding the marginal effect at the mean.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.