Fit ordinary least squares to a 0/1 default indicator and you get a model that is wrong in a way you can see. On the borrower panel of Worked example 7 the OLS fit is p̂ = −0.106436 + 0.087871x, which returns −0.1064 at zero leverage. A probability cannot be negative, the residuals are heteroskedastic by construction because the variance of a Bernoulli outcome depends on its own mean, and the linearity assumption is false at both ends.
How does logistic regression work?
The fix changes what is modelled. Instead of the probability, model its log-odds:
ln(p / (1 − p)) = b₀ + b₁x, which inverts to p = 1 / (1 + e^−(b₀ + b₁x))
The logistic function maps any real number onto (0, 1), so the fitted probability can never leave its range however extreme x becomes. There is a price. The coefficients are no longer in probability units.
Read b₁ as the change in log-odds per unit of x, and exponentiate it to get an odds ratio. On the six-bucket panel of Indian corporate borrowers the fit is b₀ = −4.006553, b₁ = 0.670655, so e^0.670655 = 1.955518: each additional turn of Debt/EBITDA very nearly doubles the odds of default. Two turns multiply the odds by 3.824051. The odds ratio is constant across the range while the probability change is not, which is the property that makes the model usable.
Advertisement
How is logistic regression estimated and tested?
The coefficients come from maximum likelihood rather than least squares. Write down the probability of observing exactly the defaults you observed as a function of the coefficients, take its log, and maximise. There is no closed form, so software iterates, and the solution is characterised by two score equations a reader can check by hand: Σ(dⱼ − nⱼp̂ⱼ) = 0 and Σxⱼ(dⱼ − nⱼp̂ⱼ) = 0. Worked example 7 verifies both to twelve decimals, which is the independent route that makes the fit admissible.
Significance comes from the likelihood-ratio test. Compare the log-likelihood of the fitted model, −150.121555, against that of an intercept-only model, −173.869522. Twice the difference, LR = 47.495934, is chi-square distributed with degrees of freedom equal to the number of restrictions, here 1, against a 5% critical value of 3.841459. Leverage matters.
What does McFadden's pseudo R-squared mean?
McFadden's pseudo-R-squared, 1 − LL_full/LL_null, is 0.136585 on this panel, and reading that as "the model explains 13.7% of the variation" is simply false. It is a ratio of log-likelihoods with no variance interpretation. McFadden himself described values between 0.2 and 0.4 as an excellent fit, so 0.137 on a single-regressor credit model is respectable rather than weak. Compare pseudo-R-squared values only across models on the same data with the same dependent variable, never against an ordinary least squares R-squared.