Skip to content

Methods and checksMethods

How every result is reached and what it was checked against, app by app.

Methods and checks pages

Binomial regression, logit or probit link, by Fisher scoring (IRLS), version 2.0.1

stats-binomial-regression@2.0.1: this version's equations with their symbols, each constant's value, their sources and whether each was read, a worked example where the record holds one, its level and what it was checked against, the number of cases, and what was not checked. This version's record is not rewritten; a correction is added under Changes.

What this page can and cannot show

Level: Checked against a reference; statsmodels, Rodríguez's printed logit fit; extreme probit in-house only; grouped-data separation rule our derivation. Reference kind: another program's fit of our model; an outside program, statsmodels GLM; SciPy; mpmath (tolerances), statsmodels 0.15.0; scipy 1.18.1; mpmath 1.4.1; a reference program this project wrote itself, second implementation (Python 3.13; NumPy, SciPy distribution functions and mpmath only), 2026-11-14, iteratively reweighted least squares in double precision, polished by Fisher scoring in mpmath 1.4.1 at 60 digits and rounded once; the condition test in double precision as the record states it; not an outside program.

Checked by this project, not independently reviewed. Every method on this page has its equations, constants, sources and cases on record, and its cases agree with the stated reference within the stated tolerance. A reader can follow each method's worked example by hand; that shows the stated method gives the stated answer for one set of inputs, and does not test the code. The other cases and their values are not printed, so a reader cannot re-run these checks. No independent scientist has yet reviewed them.

Every version of this method · Every method · What the levels mean

Version 2.0.1

Level: Checked against a reference; statsmodels, Rodríguez's printed logit fit; extreme probit in-house only; grouped-data separation rule our derivation. Reference kind: another program's fit of our model; an outside program, statsmodels GLM; SciPy; mpmath (tolerances), statsmodels 0.15.0; scipy 1.18.1; mpmath 1.4.1; a reference program this project wrote itself, second implementation (Python 3.13; NumPy, SciPy distribution functions and mpmath only), 2026-11-14, iteratively reweighted least squares in double precision, polished by Fisher scoring in mpmath 1.4.1 at 60 digits and rounded once; the condition test in double precision as the record states it; not an outside program. stats-binomial-regression@2.0.1

Built, not hosted. Generated from a snapshot of the library's records taken on 2026-11-25, as committed on 2026-11-25. A later snapshot replaces this one, so these records and this page can change.

Verification statement: Logit and probit against statsmodels 0.15.0 (Newton, tol 1e-15), each case's tolerance from statsmodels' measured error against an in-house 50-digit solve; probit cases at fitted |η| ≤ 3.6 against statsmodels, whose probit Φ, upper tail, variance and weights match mpmath within 1e-12 for |η| ≤ 4; beyond, against the in-house solve only, supporting no level; Rodríguez's printed logit fit (GLM notes §3.4, Tables 3.4 and 3.6, read 10 November 2026) at printed precision; separation decided exactly (Konis's dual LP), the grouped-row rule our derivation; estimates converged to about 1e-10 of their SE.

From events out of trials per row and numeric covariates and factors, the maximum-likelihood coefficients of a logistic or probit regression with SE from the expected information, Wald z, p and intervals, odds ratios for the logit, deviance, null deviance, log-likelihood, AIC and Pearson χ²; separated data refused before fitting.

  • How results are reported: estimates, SE, z, p and the fit statistics in full double precision; each interval's coverage echoed in unit 1 whatever unit the level was given in (95 % is echoed as 0.95, the offered level the call was taken as); no LD50 or ED50 in this version; no goodness-of-fit p
  • Uncertainty: Wald intervals from the expected information with dispersion 1; their coverage is not checked (small samples, near separation).
  • Iterates: newton, at most 100 iterations
  • Computes through this project's own routines: each IRLS step as weighted least squares by Householder QR: the step, (X′WX)⁻¹ and the reciprocal condition; the probit link and its tails; the Wald interval's z quantile and the probit start; the Wald test's two-sided p; the full log-likelihood for the AIC
  • Reference, as its record states it: statsmodels 0.15.0 GLM, with Rodriguez's printed fit
  • Level confirmed by this project's ruling of 21 November 2026

What this page can and cannot show

What was checked

182 cases in 4 files, linked by this exact version.

Run through the tool at build against another program's fit of our model; an outside program, statsmodels GLM; SciPy; mpmath (tolerances), statsmodels 0.15.0; scipy 1.18.1; mpmath 1.4.1; a reference program this project wrote itself, second implementation (Python 3.13; NumPy, SciPy distribution functions and mpmath only), 2026-11-14, iteratively reweighted least squares in double precision, polished by Fisher scoring in mpmath 1.4.1 at 60 digits and rounded once; the condition test in double precision as the record states it; not an outside program: 118 agree within the tolerance the file states, 64 refuse as the case expects, 0 differ, 0 were not run.

  • File 1, 12 cases

    • Where the expected values came from: another program's fit of our model
    • Recorded on: 2026-11-14
    • Reference: in-house 50-digit computation (mpmath), mpmath 1.4.1; scipy 1.18.1; licence BSD-3-Clause
    • Tolerance as the file states it: the reciprocal condition relative 1e-8 against the 50-digit computation (absolute 1e-21 below 1e-12); the computed cases as their own rule states; codes and statuses exact
  • File 2, 32 cases

    • Where the expected values came from: an outside program, statsmodels GLM; SciPy; mpmath (tolerances) statsmodels 0.15.0; scipy 1.18.1; mpmath 1.4.1
    • Recorded on: 2026-11-14
    • Reference: statsmodels GLM; SciPy; mpmath (tolerances), statsmodels 0.15.0; scipy 1.18.1; mpmath 1.4.1; licence BSD-3-Clause
    • Tolerance as the file states it: estimates, SE, z, limits, ratios and fit statistics relative max(1e-9, 10 × statsmodels' measured error against the 50-digit solve) per case (where units differ under one path, absolute: the larger of that size of the smallest magnitude and 100 × the measured error times the largest, an interval limit's magnitude being |estimate| + half-width; the log-likelihood absolute at that size of its magnitude); p that times (z_max² + 1) and the odds and rate ratios that times max(1, |ln ratio|), their sensitivities; no absolute rule looser than 1e-7 relative on any value it governs; Rodriguez's printed values at half a unit of their print; counts, df, names, codes and statuses exact
  • File 3, 6 cases

    • Where the expected values came from: another program's fit of our model
    • Recorded on: 2026-11-14
    • Reference: in-house 50-digit solve (mpmath), statsmodels 0.15.0; scipy 1.18.1; mpmath 1.4.1; licence BSD-3-Clause
    • Tolerance as the file states it: every value relative 1e-9 against the in-house 50-digit solve (where units differ under one path, absolute at 1e-9 of the smallest magnitude, an interval limit's being |estimate| + half-width; the log-likelihood absolute at 1e-9 of its magnitude; no absolute rule looser than 1e-7 relative on any value it governs); p that times (z_max² + 1) and the odds ratios that times max(1, |ln ratio|); counts, df, names, codes and statuses exact
  • File 4, 132 cases

    • Where the expected values came from: an outside program, second implementation (Python 3.13; NumPy, SciPy distribution functions and mpmath only) 2026-11-14
    • Recorded on: 2026-11-14
    • Reference: second implementation (Python 3.13; NumPy, SciPy distribution functions and mpmath only), 2026-11-14; licence BSD-3-Clause
    • Tolerance as the file states it: every number relative 1e-8 (absolute 1e-12 below 1e-4, in its own unit: a coefficient that is 0 by symmetry, or the deviance of a near-exact fit, comes out as rounding residue from the fit; p absolute 1e-307 below 1e-297); counts, df, statuses, codes and strings exact

Apart from the worked example, the cases and their values are not printed here. This shows agreement with this project's recorded cases. It does not show that a method suits your work, and it is not a qualification.

What was not checked

An undecided separation (300 exact pivots) is an internal invariant that returns an error and no number: no input within the caps was found to reach it; non-convergence (NO_CONVERGENCE, equation stopping) returns an error and no number, and no binomial input within the caps was found to reach it; the step-halving and far-side underflow rules of equation stopping are exercised by no binomial fixture case through the tool (the engine's unit test reaches the underflow rule with an offset the tool does not take); LD50/ED50 and their intervals (Fieller, Finney not read); profile-likelihood intervals; quasi-likelihood SE and overdispersion; the Wald intervals' coverage; offsets; interactions; Nelder and Wedderburn 1972, Albert and Anderson 1984 and Silvapulle 1981 not read (the last two as stated in Konis).

Equations

Equation 1

L = Σ {y log μ + (n − y) log(1 − μ)} + Σ log C(n, y)
logit: logit μ = η, i.e. μ = 1/(1 + exp(−η))
probit: μ = Φ(η)
η = Xβ
deviance 2Σ{y log(y/(nμ)) + (n − y) log((n − y)/(n(1 − μ)))} = 2Σ{T(y, nμ) + T(n − y, n(1 − μ))} with T(y, m) = y log(y/m) − (y − m) (the linear parts cancel), y − nμ formed as (y − n) + n(1 − μ) when μ > ½ and the failures' difference its negative, each term computed as m·h(y/m) with h(r) = r ln r − r + 1 ≥ 0, which is y log(y/m) − (y − m): with d = (y − m)/m, h is the series Σ_{k≥2} (−d)^k/(k(k − 1)), summed in double precision from k = 2 until a term no longer changes the sum, when |d| < 1/4, and y log(y/m) − (y − m) directly otherwise, a row with y = 0 giving m
so no term is negative
null deviance: the same with μ = Σy/Σn on every row (the intercept-only fit, in closed form)
Pearson χ² = Σ (y − nμ)²/(nμ(1 − μ)), a row with nμ(1 − μ) = 0 contributing 0
AIC = −2L + 2p
odds ratio exp(β) (logit only)
the start is equation start
Symbol Meaning and unit
y events (a count)
n trials (a count)
μ the row's fitted probability of an event per trial
η the row's linear predictor
p coefficients
L the log-likelihood

Source: Green PJ. Iteratively reweighted least squares for maximum likelihood estimation, and some robust and resistant alternatives. J R Statist Soc B 1984;46(2):149-192, section §1.1 (the binomial log-likelihood and the logit regression function); §3.2 examples (iii) logit and (v) probit, Φ(η), the author's copy of the version of record, from his website; read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning dcb373621450. Behind a subscription, checked 2026-11-11. No erratum found (searched Crossref: update and relation metadata for 10.1111/j.2517-6161.1984.tb01288.x), 2026-11-11.

Equation 2

X: a column of 1s (the intercept), then each covariate in the order given (its value, or log10 of it on 'log10'), then each factor's levels other than its reference, sorted by name (UTF-16 code units), each a 0/1 indicator of the row's level (treatment coding)
a covariate's coefficient is per its unit (per log10 unit on 'log10'), an indicator's is the difference from the reference
p = the number of columns. A linear covariate's coefficient is in 1/u, u the covariate's unit as given, wrapped in parentheses when u is compound (1/mg, 1/(ug/mL))
the reply's units table gives its UCUM code where the tool has a hand-written one, and otherwise { none } with the kit's reason: no code is derived at run time. Order of checks: the kit's argument checks (OUT_OF_RANGE, NOT_AN_INTEGER, UNITS_DIFFER and the kit's other codes)
then the response's own conditions (binomial LENGTHS_DIFFER for trials, then EVENTS_EXCEED_TRIALS
Poisson the offset arguments, MISSING_ARGUMENT, CONFLICTING_ARGUMENT, LENGTHS_DIFFER, NONPOSITIVE_EXPOSURE)
NO_PREDICTORS
the design's, DUPLICATE_NAME, then per covariate LENGTHS_DIFFER and NONPOSITIVE_ON_LOG, per factor LENGTHS_DIFFER, then per factor REFERENCE_NOT_A_LEVEL, FACTOR_ONE_LEVEL and TOO_MANY_LEVELS, then TOO_MANY_COEFFICIENTS and TOO_FEW_ROWS
then INVALID_OPTION for the level
each an invalid input, the first met answering. Then rank, the condition test before the fit, separation (or the Poisson no-finite-MLE test), and the fit
Symbol Meaning and unit
X the design matrix, one row per data row
p coefficients (columns of X)

Source: Green PJ. Iteratively reweighted least squares for maximum likelihood estimation, and some robust and resistant alternatives. J R Statist Soc B 1984;46(2):149-192, section §1.2: D = X, the design; the column order and treatment coding are the library's, stated, the author's copy of the version of record, from his website; read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning dcb373621450. Behind a subscription, checked 2026-11-11. No erratum found (searched Crossref: update and relation metadata for 10.1111/j.2517-6161.1984.tb01288.x), 2026-11-11.

Equation 3

SE = √diag (DᵀAD)⁻¹ at the fit
z = β̂/SE
p = 2(1 − Φ(|z|))
interval β̂ ± z₍₁₊ₗ₎/₂·SE
the ratio exp(β̂) with limits exp of the interval's
Symbol Meaning and unit
β̂ a coefficient's estimate (per its covariate's unit), as-given
z₍₁₊ₗ₎/₂ the standard normal quantile Φ⁻¹((1 + l)/2), l the caller's level
Φ the standard normal distribution function

Source: Green PJ. Iteratively reweighted least squares for maximum likelihood estimation, and some robust and resistant alternatives. J R Statist Soc B 1984;46(2):149-192, section §1.2, the asymptotic covariance (DᵀAD)⁻¹; the Wald z, p and interval are the library's standard large-sample forms, stated, the author's copy of the version of record, from his website; read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning dcb373621450. Behind a subscription, checked 2026-11-11. No erratum found (searched Crossref: update and relation metadata for 10.1111/j.2517-6161.1984.tb01288.x), 2026-11-11.

Equation 4

the likelihood equations Dᵀu = 0 with u = ∂L/∂η, D = X
Fisher scoring (DᵀAD)(β* − β) = Dᵀu with A = E[−∂²L/∂η∂ηᵀ], solved as the weighted least-squares regression of A⁻¹u + Dβ on D with weights A (IRLS)
asymptotic covariance (DᵀAD)⁻¹ with dispersion 1
Symbol Meaning and unit
u score per row
A working weight

Source: Green PJ. Iteratively reweighted least squares for maximum likelihood estimation, and some robust and resistant alternatives. J R Statist Soc B 1984;46(2):149-192, section §1.2, eqs. (1)–(4) and the covariance σ²(DᵀAD)⁻¹; §3.3, u_i = π_i(y_i − mu_i)/(τ_i²δ_i), A_ii = π_i/(τ_i²δ_i²), the author's copy of the version of record, from his website; read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning dcb373621450. Behind a subscription, checked 2026-11-11. No erratum found (searched Crossref: update and relation metadata for 10.1111/j.2517-6161.1984.tb01288.x), 2026-11-11.

Equation 5

The condition test, stated as computed. Applied to the unweighted design before the fit (W = I) and to the weighted design at the converged iterate (W = diag A at the β̂ where the stopping rule is met, A the working weight of equation score: binomial nμ(1 − μ) for the logit, nφ(η)²/(Φ(η)Φ(−η)) for the probit, Poisson μ). (1) M = √W·X, each row of X times the square root of its weight. (2) For each column j, c_j = ‖M_·j‖₂, the square root of the sum of the squared entries taken in row order in double precision
s_j = 2^(−round(log₂ c_j)), round to the nearest integer with a half rounded toward +∞, and s_j = 1 when c_j = 0
column j of M is multiplied by s_j (exact, a power of two). (3) R is the p × p upper-triangular factor of the QR factorisation of the scaled M (Householder reflections, no pivoting)
R is unique up to the signs of its rows, which change neither norm below. (4) R⁻¹ is formed explicitly by back-substitution in double precision
‖B‖₁ is the largest over columns of the sum of the absolute values of the column's entries
rcond = 1/(‖R‖₁·‖R⁻¹‖₁), computed so and never estimated. (5) The design is refused DESIGN_ILL_CONDITIONED when rcond < 1e-4, strictly
an rcond within rounding of 1e-4 may fall on either side. (6) The rank test: at the Householder step for column j, if the norm of the column's entries from row j down is at most 1e-7 times the norm of column j of the scaled M, the matrix has lost rank
before the fit that is RANK_DEFICIENT, and on a weighted design it is DESIGN_ILL_CONDITIONED. The rank test is applied to every weighted least-squares solve (the start's regression with the weights of μ₀, then the solve at each iterate from the start's β₀ on, the converged one included)
the rcond test of step (5) only before the fit and at the converged iterate. A weight that overflows to infinity fails the rank test. (7) What the refusal serves: at the converged iterate, the rcond of step (4) as belowThresholdReciprocalCondition (unit 1)
before the fit, and for a failed rank test, no number.
Symbol Meaning and unit
W the diagonal matrix of row weights (the identity before the fit)
M the weighted design √W·X
c_j the Euclidean norm of column j of M
s_j the power of two that scales column j
R the triangular factor of the scaled M
rcond the reciprocal 1-norm condition of R

Source: Green PJ. Iteratively reweighted least squares for maximum likelihood estimation, and some robust and resistant alternatives. J R Statist Soc B 1984;46(2):149-192, section §1.2: the weighted least-squares regression (3) the test is applied to; the column scaling, the condition number, its threshold and the rank test are the library's own, stated (Drybench ruling, 10 November 2026, J4 and K4), the author's copy of the version of record, from his website; read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning dcb373621450. Behind a subscription, checked 2026-11-11. No erratum found (searched Crossref: update and relation metadata for 10.1111/j.2517-6161.1984.tb01288.x), 2026-11-11.

Equation 6

ℓ is L of the method's likelihood equation, the full log-likelihood with Σ log C(n, y) (binomial) or −Σ log y! (Poisson), computed in double precision (log-gamma for the constants). Each iteration first checks the stopping rule: stop when the Newton decrement uᵀ(DᵀAD)⁻¹u ≤ 1e-20 (the squared norm of the step regression's fitted values) at the current β. Otherwise the step is tried at full length and then halved, at most 10 times, 11 trials in all
the first trial whose ℓ is finite and not below ℓ − 64·ε·|ℓ| (ℓ at the current β, ε = 2⁻⁵²) is accepted. If no trial is accepted, or 100 iterations pass without the stopping rule being met, the call is answered with the kit's NO_CONVERGENCE, an error with no number. Far-side underflow: a row observed on the far side (binomial y < n at η > 0, or y > 0 at η < 0
Poisson y > 0) whose tail quantity (logit μ(1 − μ)
probit Φ(−|η|) or φ(|η|)
Poisson μ) is below the smallest normal double, 2.2250738585072014e-308, makes ℓ count as not finite at that β, so a trial reaching it is never accepted. At the start, while ℓ at β₀ is not finite for this or any reason, β₀ is halved toward β = 0, at most 10 times
if ℓ is still not finite, NO_CONVERGENCE. A probit row whose Φ(−|η|) or φ(|η|) is 0 in double precision has weight 0 (Drybench ruling, 10 November 2026, rulings K3 and H4
J4
the level review, C1)
Symbol Meaning and unit
decrement uᵀI⁻¹u

Source: Green PJ. Iteratively reweighted least squares for maximum likelihood estimation, and some robust and resistant alternatives. J R Statist Soc B 1984;46(2):149-192, section §1.2: iterate (3) until convergence; the stopping rule, cap, halving and underflow rule are the library's own, stated, not Green's (Drybench ruling, 10 November 2026, engine rulings), the author's copy of the version of record, from his website; read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning dcb373621450. Behind a subscription, checked 2026-11-11. No erratum found (searched Crossref: update and relation metadata for 10.1111/j.2517-6161.1984.tb01288.x), 2026-11-11.

Equation 7

The start, the library's own and not Green's: μ₀ = (y + 0.5)/(n + 1) (binomial) or y + 0.1 (Poisson)
η₀ = logit μ₀, Φ⁻¹(μ₀) or log μ₀, less the offset
β₀ is the weighted least-squares regression of η₀ on X with weights A at μ₀ (equation score's working weights at η = η₀ + offset), through equation condition's column-scaled solve, whose rank test applies
Symbol Meaning and unit
μ₀ the row's starting mean (probability or count)
η₀ the row's starting linear predictor less its offset
β₀ the starting coefficients, as-given

Source: Green PJ. Iteratively reweighted least squares for maximum likelihood estimation, and some robust and resistant alternatives. J R Statist Soc B 1984;46(2):149-192, section §1.2: the iteration (3) the start feeds; the start itself is the library's own, stated, and no claim is made about what Green says of starting values (Drybench ruling, 10 November 2026, engine rulings), the author's copy of the version of record, from his website; read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning dcb373621450. Behind a subscription, checked 2026-11-11. No erratum found (searched Crossref: update and relation metadata for 10.1111/j.2517-6161.1984.tb01288.x), 2026-11-11.

Equation 8

no finite MLE exists when some β ≠ 0 has X̄β ≥ 0 (complete or quasicomplete separation)
decided by the feasibility of the dual LP X̄ᵀλ = −X̄ᵀe, λ ≥ 0, through its phase one, a floating simplex steering and an exact BigInt certificate (λ, or a Farkas β = Mπ from the phase-one dual) or an exact simplex deciding. Our derivations, labelled: a grouped row with 0 < y < n carries both signs
β recovered from the phase-one dual (Konis §4.4.4 uses a bounded LP instead)
Symbol Meaning and unit
X̄ rows signed by outcome

Source: Konis K. Linear programming algorithms for detecting separated data in binary logistic regression models. DPhil thesis, University of Oxford, 2007, section §1.3 (definitions after Albert and Anderson 1984 with Santner and Duffy's correction; theorems 1 and 2; Silvapulle 1981's theorem as stated in Konis, covering links with −log G convex); §4.2 (4.4)–(4.6); §4.4.3 (4.19), (4.20), Bland's rule; §4.5 (numerics), the thesis as deposited in the Oxford University Research Archive; read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning 40ad9b65eb92. Free to read (Oxford University Research Archive terms and conditions of use; © K. Konis 2007), checked 2026-11-11. No erratum found (searched the archive record's versions and notes), 2026-11-11.

Conventions

  • RECIPROCAL_CONDITION_THRESHOLD = 0.0001: Fixed by the method; not an argument. The threshold of the condition test (equation condition): a design whose reciprocal condition, computed as that equation states, is strictly below it before the fit or at the converged iterate is refused DESIGN_ILL_CONDITIONED.

What each mode computes:

  • link = logit: Logistic regression: logit π = η; exp(β) are odds ratios.
  • link = probit: Probit regression: Φ⁻¹(π) = η; no odds ratios.

Constants

Constants: none used.

Worked example

Worked example: one case of stats-binomial-regression@2.0.1, from its inputs through each step to the answer. Values are written as a person writes them; the working carries more digits, so your own figure may differ in the last digit shown.

Inputs

  • link = logit
  • response.events[0] = 1
  • response.events[1] = 2
  • response.events[2] = 4
  • response.events[3] = 4
  • response.trials[0] = 5
  • response.trials[1] = 5
  • response.trials[2] = 5
  • response.trials[3] = 5
  • response.eventLabel = dead
  • replicates = independent
  • level = 0.95
  • factors[0].name = group
  • factors[0].values[0] = A
  • factors[0].values[1] = A
  • factors[0].values[2] = B
  • factors[0].values[3] = B
  • factors[0].reference = A

Steps

  1. log-odds-a = -0.84729786, from response.events, response.trials; by equation 1.
  2. log-odds-b = 1.3862944, from response.events, response.trials; by equation 1.
  3. estimate = 2.2335922, from log-odds-b, log-odds-a; by equation 2; gives coefficients[1].estimate.
  4. se = 1.0493762, from response.events, response.trials; by equation 4; gives coefficients[1].se.
  5. z = 2.1284952, from estimate, se; by equation 3; gives coefficients[1].z.
  6. odds-ratio = 9.3333333, from estimate; by equation 1; gives coefficients[1].oddsRatio.estimate.

The working, as the case writes it:

statsmodels' largest relative error against the 50-digit solve on beta and SE: 1.99e-16
the case tolerance is relative max(1e-9, 10 × that)
max fitted |eta| 1.39
effective relative bound under the absolute rules 1.0e-09 (at most 1e-7)

Answer

  • coefficients[1].estimate = 2.2335922
  • coefficients[1].se = 1.0493762
  • coefficients[1].z = 2.1284952
  • coefficients[1].oddsRatio.estimate = 9.3333333

Where these values came from: an outside program, statsmodels GLM; SciPy; mpmath (tolerances) statsmodels 0.15.0; scipy 1.18.1; mpmath 1.4.1; statsmodels 0.15.0 GLM (Newton, tol 1e-15; SE from its expected information); z, p and limits from SciPy.

At build the tool returned this answer within the tolerance the file states: estimates, SE, z, limits, ratios and fit statistics relative max(1e-9, 10 × statsmodels' measured error against the 50-digit solve) per case (where units differ under one path, absolute: the larger of that size of the smallest magnitude and 100 × the measured error times the largest, an interval limit's magnitude being |estimate| + half-width; the log-likelihood absolute at that size of its magnitude); p that times (z_max² + 1) and the odds and rate ratios that times max(1, |ln ratio|), their sensitivities; no absolute rule looser than 1e-7 relative on any value it governs; Rodriguez's printed values at half a unit of their print; counts, df, names, codes and statuses exact.

Who worked this case: not recorded.

What it refuses, and its input ranges

  • RANK_DEFICIENT: the design's columns are not linearly independent; columns are never dropped silently Next: Remove the predictor that is a combination of the others.
  • DESIGN_ILL_CONDITIONED: the condition test of equation condition refuses: the reciprocal condition is strictly below the threshold RECIPROCAL_CONDITION_THRESHOLD on the unweighted design before the fit or on the weighted design at the converged iterate, or the rank test fails on a weighted design at the start's iterate or any later one (Drybench ruling, 10 November 2026, J4; K4). Only the refusal at the converged iterate serves a number, its reciprocal condition as belowThresholdReciprocalCondition; the refusal before the fit and a failed rank test serve none Next: Centre or rescale the covariate (subtract its mean, or fit it on log10), or remove a predictor that nearly duplicates another.
  • SEPARATION: the events and non-events are separated by the predictors (complete or quasicomplete), decided exactly before fitting Next: Remove or combine the predictor that separates the outcomes, or use a method with a penalised likelihood.
  • LENGTHS_DIFFER (invalid input): two columns of one call differ in length (a method condition until the kit holds it; Drybench's J5)
  • REFERENCE_NOT_A_LEVEL (invalid input): a factor's reference is not one of its levels
  • FACTOR_ONE_LEVEL (invalid input): a factor with one level
  • TOO_MANY_LEVELS (invalid input): a factor with more than 12 levels
  • TOO_MANY_COEFFICIENTS (invalid input): more than 20 coefficients
  • TOO_FEW_ROWS (invalid input): no more rows than coefficients
  • NONPOSITIVE_ON_LOG (invalid input): a log10 covariate with a value at or below 0
  • NO_PREDICTORS (invalid input): no covariate and no factor
  • OUT_OF_RANGE (invalid input): level, taken in unit 1, at or below 0 or at or above 1 (100 % included); a count below 0 (the kit's bounds)
  • NOT_AN_INTEGER (invalid input): a count (events, trials or counts) that is not a whole number (the kit's count rule)
  • UNITS_DIFFER (invalid input): the values of one covariate, or the exposures, in more than one unit (the kit's rule for a unit group)
  • DUPLICATE_NAME (invalid input): two predictors (covariates and factors together) share a name
  • INVALID_OPTION (invalid input): level, taken in unit 1 (95 % is 0.95), is not within 1e-12 (absolute, exclusive) of 0.9, 0.95 or 0.99; a level within 1e-12 of one of them is taken as exactly that level, so one ulp from 0.95 is 0.95, and 0.95 + 2e-12 or 0.8 is refused
  • EVENTS_EXCEED_TRIALS (invalid input): a row with more events than trials

Changes

2026-11-21-stats-binomial-regression@2.0.1-1

2026-11-21 · stats-binomial-regression@2.0.1 · Corrections to our methods

  • What was wrong: In a probit fit, the shared normal distribution function returned no number at large fitted |η|, where its continued fraction never met its stopping test. Inside the fit that made a candidate step's log-likelihood not a number, so step-halving rejected steps it would have accepted; every reported number came from accepted states, which had none, but the fit could stop at a different converged iterate.
  • Affected: stats_binomial_regression in version 2.0.0, probit link only, designs with one far row that is not separated (the NaN came at fitted |η| sporadically from about 3e6, regularly from about 2.2e8): 18 of the 9,278 calls of the audit probe. Their numbers moved by at most 3.8e-11 relative (the Pearson χ²; coefficients, SEs and p values at about 1e-11 relative) and by at most 2.4e-25 absolute in a deviance or Pearson χ² that is itself about 0. Statuses, fields and flags are unchanged; the logit link is unaffected.
  • What changed: In 2.0.1 the normal tail is the 0 it rounds to wherever the incomplete gamma's leading factor rounds to 0 (the fraction, at most 1/(x−a+1) for a ≥ 1 (8.2.2), at most 1/x for a ≤ 1 (8.10.1); below 1 in both, is not run), so those steps are evaluated and the fit takes the path the limit gives. Every value the function returned as a number is unchanged in every bit, and every case of the method's fixtures keeps its output hash.
  • How it was found: An audit probe of every served tool reaching the shared function, 21 November 2026, re-run on the fix: the 18 replies are the ones the probe's limit-patched run gave, to the bit.
  • Cases added: stored reference values (the shared function's regressions); the probe's replies before and after the fix are compared call by call. The fixtures carry with a declared closure change.

Tools that use it

Cite this version

Binomial regression, logit or probit link, by Fisher scoring (IRLS). Drybench; stats-binomial-regression@2.0.1; https://www.drybench.com/methods/m/stats-binomial-regression/2.0.1 (accessed [date]).