Unit 11 · Advanced regression
How to run a binary logistic regression in SPSS
Run a binary logistic regression in SPSS, interpret Exp(B) odds ratios, Nagelkerke R², Hosmer-Lemeshow and the classification table.
Quick answer: How do you run a binary logistic regression in SPSS?
- Click Analyze › Regression › Binary Logistic.
- Move the 0/1 outcome into Dependent and the predictors into Covariates.
- Under Options… tick Hosmer-Lemeshow goodness-of-fit and CI for exp(B), then click OK.
- In Block 1, read the omnibus test, Nagelkerke R² and each Exp(B).
Report it in APA style: The model predicted passing, χ²(2) = 38.42, p < .001, Nagelkerke R² = .31. Each extra hour of revision increased the odds of passing (OR = 1.20, p < .001).
What is logistic regression?
Binary logistic regression predicts a two-category outcome, such as pass or fail, from one or more predictors. Instead of predicting a score, it predicts the probability that the outcome happens.
When to use it
- The outcome has exactly two categories, coded 0 and 1.
- Predictors can be Scale or categorical.
How it works
Probabilities are converted to log-odds, which can be modelled with a straight line. Each coefficient (B) is the change in log-odds per one-unit increase in a predictor, and Exp(B) is the odds ratio: above 1 means higher odds of the outcome, below 1 means lower. The omnibus chi-square tests the whole model, Nagelkerke R² is a pseudo R², Hosmer-Lemeshow (non-significant is good) checks fit, and the classification table shows how many cases were predicted correctly.
Assumptions
- A binary outcome.
- Independent observations.
- A linear relationship between continuous predictors and the log-odds.
- No strong multicollinearity.
- Enough cases in the smaller outcome category (a common guide is 10 per predictor).
Worked example
Revision hours and anxiety predicted passing, χ²(2) = 38.42, p < .001, Nagelkerke R² = .31. Each extra hour of revision increased the odds of passing by 20% (OR = 1.20).
Key terms
- Odds
- Probability of the event ÷ probability of no event.
- Odds ratio (Exp(B))
- How the odds change per one-unit increase in a predictor.
- Pseudo R²
- An approximate measure of model fit.
Common mistakes
- Reading Exp(B) as a change in probability.
- Interpreting the Block 0 output.
- Using linear regression for a binary outcome.
How to do it in SPSS
The SPSS syntax
Prefer typing to clicking? Open File › New › Syntax, paste this in, select it and choose Run › Selection. Every dialog's Paste button writes the same kind of code.
LOGISTIC REGRESSION VARIABLES passed
/METHOD=ENTER hours anxiety
/PRINT=GOODFIT CI(95)
/CRITERIA=PIN(.05) POUT(.10) ITERATE(20) CUT(.5).Practice data
Download the file used in this lesson and run it yourself in SPSS. Your results will closely match the screens above, though a few numbers may differ slightly.
- exam_pass.savRevision hours, anxiety and whether students passed (N = 150)
Now practise it interactively →
Reading is only half of it. Tap through the real SPSS menus, read the output and pick the right write-up in 7 quick questions, with instant feedback on every answer.
Practice for this lesson is part of Pro, with every unit, unlimited hearts and saved progress.