GIFSQ Tools · Module 16 — Statistics, Experimental Design & Research · Tool 313 of 500
Fit a logistic model to a binary outcome (pass/fail, present/absent) against one predictor, by iteratively reweighted least squares — the model for yes/no laboratory decisions.
Try sample values — fills the form with the worked example below.
–
Coefficient b₁
–
Odds ratio e^b₁
–
Intercept b₀
Equation: logit(p) = ln(p ÷ (1 − p)) = b₀ + b₁x. Coefficients are fitted by Newton–Raphson / iteratively reweighted least squares (IRLS) to maximise the binomial log-likelihood. Odds ratio = e^b₁.
Method: Logistic regression with one predictor, fitted by IRLS (standard textbook method; Hosmer, Lemeshow and Sturdivant, Applied Logistic Regression). Iteration stops when the largest coefficient change is below 1e-10, or after 100 iterations.
Assumptions: the outcome is binary and independent across observations; the log-odds are linear in x; no complete separation (a predictor value that perfectly splits 0s and 1s).
Limitations: with complete separation the coefficients grow without bound — this tool reports an error instead of a meaningless huge number. Small samples give wide uncertainty; this tool reports point estimates only, not confidence intervals for the coefficients.
Rounding: coefficients to 4 decimal places; odds ratio to 4 decimal places; intermediates unrounded.
This is a calculation aid, not a laboratory report — confirm against your accredited method before citing a value.
Method: Logistic regression with one predictor, fitted by IRLS (standard textbook method; Hosmer, Lemeshow and Sturdivant, Applied Logistic Regression). Iteration stops when the largest coefficient change is below 1e-10, or after 100 iterations.
Assumptions: the outcome is binary and independent across observations; the log-odds are linear in x; no complete separation (a predictor value that perfectly splits 0s and 1s).
Limitations: with complete separation the coefficients grow without bound — this tool reports an error instead of a meaningless huge number. Small samples give wide uncertainty; this tool reports point estimates only, not confidence intervals for the coefficients.
Rounding: coefficients to 4 decimal places; odds ratio to 4 decimal places; intermediates unrounded.
This is a calculation aid, not a laboratory report — confirm against your accredited method before citing a value.
Worked example: X 0,0,0,1,1,1,2,2,2,3,3,3 with Y 0,0,1,0,1,1,1,1,1,1,1,1: b₀ = −0.9215, b₁ = 2.0685, odds ratio 7.9131 per unit of x.
Enter values above to see results.
An odds ratio of 1 means no effect; above 1 the odds of the outcome rise with x. Tool 313 of 500 — GIFSQ