9

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:

Michael Webb
  • 1,936
  • 10
  • 21
  • 1
    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? – whuber Jul 03 '19 at 19:11
  • @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. – Emma Jean Jul 03 '19 at 19:14
  • @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. – Michael Webb Jul 03 '19 at 19:15
  • Isn't that the very *meaning* of maximum: everything else is smaller?? – whuber Jul 03 '19 at 19:40
  • Is it a joke that approximation (0.08) turns out to be close to 0.13? Or I misunderstood something? – user158565 Jul 03 '19 at 19:49
  • @whuber 0.33/4 = 0.0825 is supposed to be the maximum marginal effect or very close to it. So it should be greater than the derivative evaluated at the central point of the data (0.13). – Michael Webb Jul 03 '19 at 20:21
  • @user158565, I agree it doesn't seem all that close to me. I guess that depends on you definition of close but if I am understanding correctly, the derivative evaluated at the central point in the data should be no greater than 0.33/4. – Michael Webb Jul 03 '19 at 20:21
  • 1
    I see what you are saying--I misread the quotation. – whuber Jul 03 '19 at 21:36

2 Answers2

9

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.

COOLSerdash
  • 25,317
  • 8
  • 73
  • 123
5

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.

dimitriy
  • 31,081
  • 5
  • 63
  • 138