Skip to main content

Logit — Binary logistic regression

Logit models the probability of a binary dependent variable (Y{0,1}Y \in \{0,1\}) through the logistic link. It is the standard model when the outcome is "yes/no" (default, participation, pass/fail…).

When to use

Use Logit when YY is binary. Logit coefficients are interpreted via the odds ratio eβe^{\beta}; to interpret directly in probability terms, read the marginal effects.


Model specification

P(Yi=1Xi)=11+e(β0+β1X1i++βkXki)P(Y_i = 1 \mid X_i) = \frac{1}{1 + e^{-(\beta_0 + \beta_1 X_{1i} + \dots + \beta_k X_{ki})}}

Estimated by Maximum Likelihood (MLE). For coefficient βj\beta_j: eβje^{\beta_j} is the odds ratio; marginal effects depend on the value of XX.


Interpretation & diagnostics

  • Odds ratio eβj>1e^{\beta_j} > 1 ⇒ increases odds; <1< 1 ⇒ decreases.
  • Marginal effects (average AME or at-the-mean MEM) give the change in probability.
  • Fit: Pseudo-R2R^2 (McFadden), classification accuracy, ROC/AUC.
  • Check: perfect separation, multicollinearity.

Running in EcoLab

  1. Modeling module → Limited dependent variable family → Logit.
  2. Select the binary YY and the XX variables.
  3. Run; read coefficients, odds ratios, marginal effects, AUC; export the replication code.

Input / output example

Input (illustrative): default (0/1) on leverage, roa, size.

Output (format, illustrative figures — not real results):

VariableCoefficientOdds ratioAMEp-value
leverage1.203.320.180.000
roa−2.100.12−0.310.001

Replication code

* ===== Logit — Binary logistic regression =====
* Estimate the logit model
logit vo_no don_bay roa quy_mo

* Odds ratios
logit vo_no don_bay roa quy_mo, or

* Average marginal effects (AME)
margins, dydx(*)

* Classification table (sensitivity, specificity)
estat classification

* ROC curve and AUC
lroc

Limitations

  • Raw coefficients are not probability effects — use marginal effects.
  • Assumes the logistic form; for the normal-CDF link see Probit.

Video tutorial

Video Tutorial: Guide to running Logit (logistic regression) in EcoLab

See also