Predict a binary outcome (0/1) from one or more predictors using logistic regression (IRLS). Results include odds ratios, classification table, and model fit statistics.
Binary logistic regression is a statistical method used to model the relationship between one or more predictor variables and a binary (dichotomous) outcome variable. Unlike linear regression, which predicts a continuous outcome, logistic regression predicts the probability that an observation belongs to one of two categories (coded as 0 and 1). The model uses the logistic (sigmoid) function to constrain predicted probabilities between 0 and 1.
Odds Ratio — Exp(B)
The odds ratio represents the multiplicative change in the odds of the outcome for a one-unit increase in the predictor. An odds ratio greater than 1 indicates increased odds, while a value less than 1 indicates decreased odds. A value of exactly 1 means the predictor has no effect.
Wald Test
The Wald test evaluates whether each individual predictor is statistically significant. It is calculated as the squared ratio of the coefficient to its standard error (Wald = (B/SE)²) and follows a chi-square distribution with 1 degree of freedom.
Pseudo R² Measures
Unlike linear regression, logistic regression does not have a true R². Cox & Snell R² and Nagelkerke R² are approximations that indicate how much of the variation in the outcome is explained by the model. Nagelkerke R² adjusts the Cox & Snell measure to range from 0 to 1.
The classification table (confusion matrix) compares predicted categories with observed categories using a 0.5 probability cutoff. Sensitivity (true positive rate) measures how well the model identifies actual positives, while specificity (true negative rate) measures how well it identifies actual negatives. Overall accuracy indicates the percentage of all cases correctly classified.
The Hosmer-Lemeshow test evaluates how well the model fits the data by dividing observations into groups based on predicted probabilities and comparing observed and expected frequencies. A non-significant result (p > .05) indicates adequate model fit, meaning the model's predictions are consistent with the observed data.
Example APA Report
A binary logistic regression was conducted to predict purchase behavior from age and income. The overall model was statistically significant, χ²(2) = 15.43, p < .001, Nagelkerke R² = .42. The model correctly classified 85.0% of cases. Age was a significant predictor, B = 0.12, Wald χ²(1) = 6.78, p = .009, OR = 1.13, 95% CI [1.03, 1.24].
StatMate's logistic regression uses the Iteratively Reweighted Least Squares (IRLS) algorithm, the same method used by R's glm() and SPSS. Convergence is checked at each iteration with a tolerance of 10&sup-;8. The implementation includes separation detection and uses jstat for chi-square probability distributions.
T-Test
Compare means between two groups
ANOVA
Compare means across 3+ groups
Chi-Square
Test categorical associations
Correlation
Measure relationship strength
Descriptive
Summarize your data
Sample Size
Power analysis & sample planning
One-Sample T
Test against a known value
Mann-Whitney U
Non-parametric group comparison
Wilcoxon
Non-parametric paired test
Regression
Model X-Y relationships
Multiple Regression
Multiple predictors
Cronbach's Alpha
Scale reliability
Factor Analysis
Explore latent factor structure
Kruskal-Wallis
Non-parametric 3+ group comparison
Repeated Measures
Within-subjects ANOVA
Two-Way ANOVA
Factorial design analysis
Friedman Test
Non-parametric repeated measures
Fisher's Exact
Exact test for 2×2 tables
McNemar Test
Paired nominal data test
Paste from Excel/Sheets or drop a CSV file
Paste from Excel/Sheets or drop a CSV file
Enter your data and click Calculate
or click "Load Example" to try it out