Regression calculator

Logistic regression calculator

Fit binary logistic regression models with Odds Ratios (OR), log-odds coefficients β, Wald z-tests, McFadden Pseudo-R², and likelihood ratio tests.

Run this test live in StatLab npm i @statlab/core

When to use it

Use when modeling a binary categorical outcome (0/1, Success/Failure).

Required Inputs

  • Binary outcome vector Y (0/1)
  • Predictor matrix X
  • Confidence level

Mathematical Formula

P(Y=1) = 1 / (1 + exp(-(β₀ + β₁X₁ + ...))), OR = exp(β_i)

Reporting Cautions

  • Requires sufficient sample size (at least 10-15 events per predictor variable).
  • Check for complete separation where a predictor perfectly splits the binary outcome.

Code Snippets (Python, R, TypeScript)

Python (SciPy / Statsmodels)
import statsmodels.api as sm
X = sm.add_constant(x_matrix)
model = sm.Logit(y_vals, X).fit()
print(model.summary())
R Language
model <- glm(y ~ x1 + x2, data = df, family = "binomial")
summary(model)
TypeScript (@statlab/core)
import { logisticRegression } from '@statlab/core';
const res = logisticRegression(yVals, xMatrix);

Developer Use Cases & Production Integrations

  • Modeling binary user conversion probabilities based on telemetry feature signals in VoxelPulse.
  • Predicting software build failure probability based on pull request metrics.

VoxelPulse Telemetry Control Plane

Continuous A/B testing, statistical telemetry analysis, and automated feedback loops for live backend services.

Explore VoxelPulse →

VoxelAssurance Release Readiness

Fixed-price AI release-readiness sprints, automated regression testing, and reliability statistical benchmarks.

Explore VoxelAssurance →

Related Statistical Test Calculators

Explore static calculators across the StatLab inference engine suite.