Logistic regression calculator (binary outcome)
Binary logistic regression models the probability of a yes/no outcome (pass/fail, disease/no disease, bought/did not buy) from one or more predictors. Each coefficient is reported with its odds ratio, which tells you how the odds of the outcome change for a one-unit increase in the predictor.
No sign-up, nothing to install. Calculations run in your browser; the worksheets, results and charts you create are stored by AI Walay to improve DATAJIN.
When to use it
- The outcome has two categories coded 1 (event) and 0 (no event).
- Estimating risk factors as odds ratios.
- Building a simple classifier you can evaluate with an ROC curve.
Assumptions
- The outcome column contains only 0 and 1.
- Observations are independent.
- A linear relationship between each numeric predictor and the log-odds of the outcome.
- Enough events: about 10 or more events per predictor.
How to run it in DATAJIN
- Put the predictors in columns and the 0/1 outcome in another column.
- Open Analyze and choose Logistic regression.
- Select the predictors, then select the outcome column last, and click Run.
Example: open the Titanic passengers dataset (pclass and fare as predictors, survived (0/1) as the outcome) and follow the steps above.
What you get
- Coefficient (log-odds) for the intercept and each predictor
- Odds ratio, standard error, z statistic and p-value per term
How to interpret the result
An odds ratio above 1 means higher values of the predictor increase the odds of the outcome; below 1 means they decrease it. For example, OR = 1.8 means the odds rise by 80% per one-unit increase. Predictors with p < 0.05 are significant.
Frequently asked questions
How do I interpret an odds ratio?
It is the multiplicative change in the odds of the outcome for a one-unit increase in the predictor, with other predictors held constant. OR = 1 means no effect.
How do I check how well the model predicts?
Use the model’s predicted scores with the ROC curve analysis to get the AUC.