Advanced maths

GLM regression calculator from response and design matrix

Fit a bounded generalized linear model from response and predictor rows, with explicit family/link, optional intercept, coefficient uncertainty and convergence diagnostics.

Your numbers

One response per design row. Binary mode requires 0/1; Poisson requires nonnegative whole counts.
5–300 observations, 1–5 predictors. Add an intercept only with the selector or as an explicit column, not both.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

A generalized linear model separates the linear predictor from the response mean and its variance assumption. This page supports Gaussian identity, individual-binary logit and Poisson log-link models under one consistent design-matrix interface. It estimates coefficients by unpenalized scoring with step halving, verifies both score and coefficient convergence, and reports fitted means in observation order. The intercept is an explicit choice, not an invisible column. Model-based uncertainty follows the selected family; it does not automatically protect against dependence, misspecification or overdispersion.

THE FORMULAη=Xβ; μ=η for Gaussian, μ=1/(1+exp(−η)) for binary logit, μ=exp(η) for Poisson.

A worked example

Enter x=(0,1,2,3,4) as five design rows and y=(1,2,2,4,5), with a Gaussian identity link and an intercept. The fitted mean is 0.8+1.0x, so predictions are 0.8,1.8,2.8,3.8,4.8. Squared residuals sum to 0.8, and the residual degrees of freedom are five minus two, giving dispersion 0.8/3. Switching the same responses to binary mode is invalid because the values are not 0 or 1; changing a family changes the probability model, not merely the output label.

Good to know

5–300 matched response/design rows with 1–5 predictors, optional intercept and finite bounded input. Binary responses are individual 0/1 records; grouped binomial proportions/trial counts are unsupported. Poisson uses unit dispersion and nonnegative integer counts. Gaussian dispersion is residual SSE/(n−p). Scoring is capped at 100 iterations; singular designs, boundary-only responses, separation and poor conditioning raise errors. No offsets, sample weights, penalization, robust covariance, missing-value deletion or causal interpretation.

The coefficient lives on the link scale

With an identity link, a predictor coefficient is an additive change in the modeled mean for one unit of that predictor, conditional on the other columns. With a logit link it changes log odds, so exponentiating it gives a conditional odds ratio. With a log link it changes log mean, so exponentiating gives a mean ratio under the fitted model. These interpretations require the same covariate adjustment and do not establish a causal effect.

The design contains the actual numeric predictor columns. Categorical coding, interaction products and polynomial columns must be supplied deliberately; the tool does not infer them from text labels. Adding an intercept changes the model space. Entering a column of ones while also selecting automatic intercept duplicates that direction and produces a rank error. This explicit contract prevents a coefficient table from hiding a different design than the user intended.

The Gaussian identity example fits an additive mean with residual dispersionMean: 0.8 + xResidual SSE: 0.8Residual df: 3Dispersion: 0.8/3
For x=0,1,2,3,4 and y=1,2,2,4,5, the fitted mean is 0.8+x. Predictions are 0.8,1.8,2.8,3.8,4.8; residual sum of squares is 0.8. With five rows and two coefficients, residual dispersion is 0.8/3.

Convergence is necessary but does not validate the statistical model

Iterative scoring solves a sequence of weighted linear problems. Column scaling reduces avoidable numeric imbalance, while step halving rejects moves that worsen the log likelihood. A converged coefficient step and small score support a numerical solution; they do not prove that linearity on the link scale or the assumed variance is appropriate. Binary separation can drive coefficients toward infinity, so this page rejects near-boundary or nonconvergent fits rather than displaying a spurious huge estimate.

Gaussian coefficient tests use residual-variance t inference. Binary and Poisson tests use unit-dispersion model-based Wald normal inference. Overdispersed counts, correlated observations or influential outliers can make those standard errors misleading. Predictions are fitted means, not individual future-outcome guarantees. The Weighted polynomial regression calculator uses a particular curve basis and weighting scheme; this page instead accepts a declared design and several response families, keeping their assumptions and diagnostics together.

A few questions, answered

Can I enter successes divided by trials in binary mode?

No. This implementation supports individual binary observations only. Grouped binomial data need a trial-count and weighting convention that this page does not infer.

Does a small coefficient p-value prove causation?

No. It is conditional on the fitted model and its assumptions. Confounding, selection and dependence require study-design and statistical analysis beyond this coefficient table.

Find your calculator

Start typing to explore the library.