# logit

**logit** 是一个函数，它把 0 与 1 之间的概率 \( p \) 转换为相应优势的对数，\( \mathrm{logit}(p) = \log\left(\frac{p}{1-p}\right) \)，并充当逻辑回归——二值结局的标准统计模型——的连接函数。<sup>[1](https://stats.oarc.ucla.edu/wp-content/uploads/2025/05/logistic_regression_stata.html)</sup> 由于概率被限制在 0 与 1 之间，而回归预测变量无界，logit 把单位区间映射到整条实数轴，使预测变量的线性组合能够表示一个事件的对数优势。<sup>[1](https://stats.oarc.ucla.edu/wp-content/uploads/2025/05/logistic_regression_stata.html)</sup> 这一术语由生物统计学家约瑟夫·伯克森（Joseph Berkson）在其 1944 年关于生物检定的论文中引入。<sup>[2](https://www.stata.com/manuals/rlogit.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | \( \mathrm{logit}(p) = \log\left(\frac{p}{1-p}\right) \)，优势的自然对数；它把 \( (0,1) \) 映射到 \( (-\infty, \infty) \)<sup>[1](https://stats.oarc.ucla.edu/wp-content/uploads/2025/05/logistic_regression_stata.html)</sup> |
| 逆函数 | 逆 logit，或称逻辑函数，为 \( \mathrm{logit}^{-1}(x) = \frac{e^x}{1+e^x} \)，把任意实数映射为 \( (0,1) \) 中的概率<sup>[3](https://ppw-okpiv.pages.gitlab.kuleuven.be/education/statisticsiv/chapter9.html)</sup> |
| 在广义线性模型中的作用 | logit 是二项分布族的典范连接，之所以如此选择，是因为此时回归参数存在充分统计量，且结果易于解释<sup>[4](https://epub.ub.uni-muenchen.de/1425/)</sup> |
| 函数的起源 | 可能由比利时数学家皮埃尔-弗朗索瓦·韦吕斯特（Pierre-François Verhulst，1804–1849）于 1838 年发明，用以描述人口增长；他于 1845 年将其命名为“logistic”<sup>[5](https://www.sciencedirect.com/science/article/abs/pii/S1369848604000676)</sup> |
| 术语的起源 | “logit”由约瑟夫·伯克森在《美国统计协会杂志》39 (227): 357–365 (1944) 的《逻辑函数在生物检定中的应用》一文中引入<sup>[2](https://www.stata.com/manuals/rlogit.pdf)</sup><sup> • </sup><sup>[6](https://hero.epa.gov/reference/3201/)</sup>  |
| 系数的含义 | 对逻辑回归系数取指数得到优势比：在模型其他变量固定时，\( e^{\beta} \) 是该变量的优势比<sup>[7](https://www.cdc.gov/field-epi-manual/php/chapters/analyze-interpret-data.html)</sup> |
| 已知陷阱 | 当结局不罕见时，优势比会高估相对风险，而且当基线患病率超过 10% 时，该问题会加剧<sup>[8](https://stacks.cdc.gov/view/cdc/222739/cdc_222739_DS1.pdf)</sup> |

## 定义与逆函数

优势表示每出现一次失败所对应的期望成功次数：若 \( p = 0.75 \)，则优势为 \( 0.75/0.25 = 3 \)，即每失败一次对应三次成功。对优势取自然对数即得 logit；它对 (0,1) 中的概率有定义，取值覆盖整条实数轴；其逆函数，即逻辑 S 形函数，作为实值对数优势的函数呈 S 形（sigmoidal）。<sup>[1](https://stats.oarc.ucla.edu/wp-content/uploads/2025/05/logistic_regression_stata.html)</sup> 逆变换从任意实值恢复概率：<sup>[3](https://ppw-okpiv.pages.gitlab.kuleuven.be/education/statisticsiv/chapter9.html)</sup>

\[ \mathrm{logit}^{-1}(x) = \frac{e^x}{1+e^x} \]

这两个函数互为逆运算，\( \mathrm{logit}^{-1}(\mathrm{logit}(p)) = p \)，而逆 logit 正是韦吕斯特在 19 世纪命名为“logistic”的同一个函数。<sup>[1](https://stats.oarc.ucla.edu/wp-content/uploads/2025/05/logistic_regression_stata.html)</sup><sup> • </sup><sup>[5](https://www.sciencedirect.com/science/article/abs/pii/S1369848604000676)</sup>

## 逻辑回归中的 logit

逻辑回归断言结局的对数优势与预测变量 \( x_1 \) 至 \( x_k \) 之间存在线性关系：<sup>[1](https://stats.oarc.ucla.edu/wp-content/uploads/2025/05/logistic_regression_stata.html)</sup>

\[ \mathrm{logit}(p_i) = \log\left(\frac{p_i}{1-p_i}\right) = \beta_0 + \beta_1 x_{i1} + \cdots + \beta_k x_{ik} \]

系数 \( \beta_1 \) 是相应预测变量每增加一个单位时对数优势的期望变化量。由于对数之差是比值的对数，对系数取指数便得到优势比，即每增加一个单位时优势的乘性变化。<sup>[1](https://stats.oarc.ucla.edu/wp-content/uploads/2025/05/logistic_regression_stata.html)</sup> 在内尔德（Nelder）及其同事的广义线性模型框架中，logit 是二项数据的典范连接：令线性预测子等于二项分布的自然参数，便得到回归参数的充分统计量，并使结果解释简单。<sup>[4](https://epub.ub.uni-muenchen.de/1425/)</sup><sup> • </sup><sup>[9](https://distillcourse.com/courses/classical-ml-interview/lessons/glm)</sup>

logit 在数值上也很方便。逆 logit 把任意有限实值线性预测子映射到区间 \( (0,1) \)，而 logit 本身把 \( (0,1) \) 映射到实数轴；相比之下，对数连接仅对 \( \eta \le 0 \) 有效，恒等连接很容易产生落在似然定义域之外的预测值，而该定义域要求 \( 0 \le \eta \le 1 \)。<sup>[10](https://stats.stackexchange.com/questions/655676/when-do-we-use-non-canonical-link-functions-in-glm)</sup><sup> • </sup><sup>[22](https://mc-stan.org/docs/2_23/reference-manual/logit-transform-jacobian-section.html)</sup> 软件反映了这一默认选择：R 的 `binomial` 族接受 `logit`、`probit`、`cauchit`、`log`、`identity` 和 `cloglog` 等连接，其中 `logit` 为默认；Stata 则为同一模型提供分开的 `logit`（系数）和 `logistic`（优势比）命令。<sup>[11](https://search.r-project.org/R/refmans/stats/html/family.html)</sup><sup> • </sup><sup>[2](https://www.stata.com/manuals/rlogit.pdf)</sup>

## 解释：优势比及其局限

优势比是 logit 模型通常报告的统计量，但它们带有两个有充分文献记载的警示。第一，优势比以优势而非概率来表述，常被误认为相对风险。对于罕见结局，两者几乎一致；当结局不罕见时，优势比总会高估相对风险，而且当结局的基线患病率超过 10% 时，差异会增大。<sup>[8](https://stacks.cdc.gov/view/cdc/222739/cdc_222739_DS1.pdf)</sup> 第二，逻辑回归所得优势比的量级会被一个任意因子缩放，即二值结局中未解释部分方差的平方根。加入解释变量会改变这个因子，因此来自协变量集不同的模型、或来自不同研究的优势比，不能在量级上相互比较。<sup>[8](https://stacks.cdc.gov/view/cdc/222739/cdc_222739_DS1.pdf)</sup>

一个相关性质是不可折叠性：logit 连接使回归系数成为条件对数优势，因此即使所加入的协变量不是混杂因素，调整后的优势比也不同于边际优势比。<sup>[12](https://arxiv.org/abs/2110.08648)</sup> 风险比或风险差模型是避免这一问题的替代方案。<sup>[13](https://pmc.ncbi.nlm.nih.gov/articles/PMC8530151/)</sup>

## 估计问题与补救

逻辑回归系数通常通过最大似然法拟合，使用牛顿–拉夫森或 Fisher 得分等迭代方法。来自小样本或中等样本的估计存在 \( n^{-1} \) 阶偏倚，并且在某些数据集中，似然仅在至少一个参数估计发散到无穷时才收敛；这种情况称为分离，当一个因素或风险因素的线性组合能够把响应与非响应完全分开时就会发生。<sup>[14](https://academic.oup.com/biometrics/article/65/4/1262/7333492)</sup>

当时在南安普顿大学的戴维·弗思（David Firth）于 1993 年证明，修改得分函数可以消除最大似然估计渐近偏倚中的一阶项；在采用典范参数化的指数族中，这相当于用 Jeffreys 不变先验对似然进行惩罚。<sup>[15](https://doi.org/10.1093%2Fbiomet%2F80.1.27)</sup> 这种惩罚似然方法也解决了分离问题，科斯米迪斯（Kosmidis）与弗思后来证明，逻辑回归所得的偏倚缩减估计总是存在。<sup>[14](https://academic.oup.com/biometrics/article/65/4/1262/7333492)</sup><sup> • </sup><sup>[16](https://www.sciencedirect.com/science/article/pii/S0167715223001256)</sup> 样本量指导也是标准做法：佩杜齐（Peduzzi）及其同事 1996 年发表在《临床流行病学杂志》上、被广泛引用的一项模拟研究建议，每个预测变量至少要有 10 个事件，即较少见结局类别中的观测，以避免系数有偏、标准误膨胀以及模型不稳定、过拟合。<sup>[17](https://casrai.org/guides/logistic-regression-logit-model)</sup>

## 历史

逻辑函数可能最早由比利时数学家皮埃尔-弗朗索瓦·韦吕斯特于 1838 年发明，用以描述人口增长；他于 1845 年为其命名；此后八十年间，它又因人口增长和自催化化学反应描述等用途被独立重新发现数次。<sup>[5](https://www.sciencedirect.com/science/article/abs/pii/S1369848604000676)</sup> 据阿姆斯特丹大学经济史学家 J. S. 克拉默（J. S. Cramer）称——其 2003 年著作《经济学及其他领域的 logit 模型》（*Logit Models from Economics and Other Fields*）追溯了这段历史——后续事件由少数学者决定性地塑造：增长函数的广泛接受归功于雷蒙德·珀尔（Raymond Pearl）和洛厄尔·里德（Lowell Reed），对韦吕斯特首创性的普遍承认归功于乌德尼·尤尔（Udny Yule），而该函数在生物检定中、进而总体上在统计学中的引入则归功于伯克森。<sup>[5](https://www.sciencedirect.com/science/article/abs/pii/S1369848604000676)</sup><sup> • </sup><sup>[18](https://www.cambridge.org/ch/files/2013/6690/1022/1208_default.pdf)</sup>

**伯克森与生物检定。** 约瑟夫·伯克森（1899–1982）出生于纽约市，先后就读于纽约市立学院、哥伦比亚大学和约翰斯·霍普金斯大学，获得医学博士和统计学博士学位，并于 1931 年作为生物统计学家前往梅奥诊所。<sup>[2](https://www.stata.com/manuals/rlogit.pdf)</sup> 他 1944 年发表在《美国统计协会杂志》上的论文展示了如何将逻辑函数应用于生物检定，即根据生物反应估计药物剂量。<sup>[6](https://hero.epa.gov/reference/3201/)</sup> 威尔逊（Wilson）很可能在 1943 年、即伯克森论文发表前夕，首次发表了将逻辑曲线作为生物检定中正态分布替代品的应用。<sup>[19](https://www.sciencedirect.com/science/article/pii/S1369848604000676)</sup> 基于正态累积分布的竞争性 probit 模型通常归功于加达姆（Gaddum）1933 年的报告和布利斯（Bliss）1934 年的论文，而在伯克森的职业生涯中，probit 与 logit 之间的选择一直是一场持续的争论。<sup>[19](https://www.sciencedirect.com/science/article/pii/S1369848604000676)</sup><sup> • </sup><sup>[2](https://www.stata.com/manuals/rlogit.pdf)</sup> 从生物检定出发，logit 在 1950 年前后扩展到更广泛的统计应用，后来又进入经济学、流行病学和机器学习。<sup>[5](https://www.sciencedirect.com/science/article/abs/pii/S1369848604000676)</sup>

## logit 及其替代方案

logit 是二值数据的几种连接函数之一。Probit 回归使用正态累积分布而非逻辑累积分布；两者在预测上完全一致，即对个案的排序完全相同，尽管其系数处于不同尺度上。<sup>[20](https://arxiv.org/abs/1502.04742)</sup> 互补双对数连接使模型类似于离散时间比例风险模型，而对数连接产生风险比而非优势比。<sup>[10](https://stats.stackexchange.com/questions/655676/when-do-we-use-non-canonical-link-functions-in-glm)</sup> 非典范连接可以改善以残差偏差衡量的拟合优度，但它们会使协变量效应的解释复杂化，而且当观测数很大时，经典的连接拟合检验可能过于敏感。<sup>[4](https://epub.ub.uni-muenchen.de/1425/)</sup> 在二值结局之外，logit 变换还是用于分类数据和匹配数据的多项 logit 模型与条件 logit 模型的基础，而心理测量学中的项目反应理论则把个人能力和题目难度都放在 logit 尺度上。<sup>[2](https://www.stata.com/manuals/rlogit.pdf)</sup><sup> • </sup><sup>[21](https://www.teachingenglish.org.uk/sites/teacheng/files/a_study_on_teachers_item_weighting_and_the_rasch_model_v2_0.pdf)</sup>

## References

1. [Logistic Regression in Stata, UCLA Office of Advanced Research Computing](https://stats.oarc.ucla.edu/wp-content/uploads/2025/05/logistic_regression_stata.html)
2. [logit — Logistic regression, reporting coefficients, Stata Base Reference Manual](https://www.stata.com/manuals/rlogit.pdf)
3. [Logistic regression – predicting academic success, Statistics 4, KU Leuven](https://ppw-okpiv.pages.gitlab.kuleuven.be/education/statisticsiv/chapter9.html)
4. [Czado, C. and Munk, A. (1996). Noncanonical Links in Generalized Linear Models – When is the Effort Justified? LMU Munich Discussion Paper](https://epub.ub.uni-muenchen.de/1425/)
5. [Cramer, J. S. (2004). The early origins of the logit model. Studies in History and Philosophy of Biological and Biomedical Sciences 35(4): 613–626](https://www.sciencedirect.com/science/article/abs/pii/S1369848604000676)
6. [Berkson, J. (1944). Application of the logistic function to bio-assay, EPA HERO reference record](https://hero.epa.gov/reference/3201/)
7. [Analyzing and Interpreting Data, CDC Field Epidemiology Manual](https://www.cdc.gov/field-epi-manual/php/chapters/analyze-interpret-data.html)
8. [Norton, E. C., Dowd, B. E., Maciejewski, M. L. (2018). Odds Ratios—Current Best Practice and Use (JAMA Guide to Statistics and Methods, via CDC stacks)](https://stacks.cdc.gov/view/cdc/222739/cdc_222739_DS1.pdf)
9. [Generalized linear models, distillcourse](https://distillcourse.com/courses/classical-ml-interview/lessons/glm)
10. [When do we use non-canonical link functions in glm? Cross Validated](https://stats.stackexchange.com/questions/655676/when-do-we-use-non-canonical-link-functions-in-glm)
11. [family {stats}, R Documentation](https://search.r-project.org/R/refmans/stats/html/family.html)
12. [Minding non-collapsibility of odds ratios when recalibrating risk prediction models, arXiv:2110.08648](https://arxiv.org/abs/2110.08648)
13. [Defining, Quantifying, and Interpreting "Noncollapsibility" in Epidemiologic Studies of Measures of "Effect", PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC8530151/)
14. [Maiti, T. and Pradhan, V. (2009). Bias Reduction and a Solution for Separation of Logistic Regression with Missing Covariates. Biometrics 65(4): 1262–1269](https://academic.oup.com/biometrics/article/65/4/1262/7333492)
15. [Firth, D. (1993). Bias reduction of maximum likelihood estimates. Biometrika 80(1): 27–38](https://doi.org/10.1093%2Fbiomet%2F80.1.27)
16. [Conjugate priors and bias reduction for logistic regression models, ScienceDirect](https://www.sciencedirect.com/science/article/pii/S0167715223001256)
17. [Logistic Regression: The Logit Model, CASRAI guide](https://casrai.org/guides/logistic-regression-logit-model)
18. [Cramer, J. S. (2003). The origins and development of the logit model, University of Amsterdam working paper](https://www.cambridge.org/ch/files/2013/6690/1022/1208_default.pdf)
19. [The early origins of the logit model, ScienceDirect full record](https://www.sciencedirect.com/science/article/pii/S1369848604000676)
20. [On the Predictive Properties of Binary Link Functions, arXiv:1502.04742](https://arxiv.org/abs/1502.04742)
21. [A Study on Teachers' Item Weighting and the Rasch Model, British Council](https://www.teachingenglish.org.uk/sites/teacheng/files/a_study_on_teachers_item_weighting_and_the_rasch_model_v2_0.pdf)
22. [Stan Reference Manual](https://mc-stan.org/docs/2_23/reference-manual/logit-transform-jacobian-section.html)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Statistical inference, estimation, sampling, and testing › Regression analysis

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/logit

English original: https://www.edgepedia.org/logit
