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.

Free tutorialPro practiceAbout 5 minutes7 practice questions

Quick answer: How do you run a binary logistic regression in SPSS?

  1. Click Analyze › Regression › Binary Logistic.
  2. Move the 0/1 outcome into Dependent and the predictors into Covariates.
  3. Under Options… tick Hosmer-Lemeshow goodness-of-fit and CI for exp(B), then click OK.
  4. 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).

Last updated November 2026 · Not sure this is the right test? Try the Which statistical test? tool.

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

Binary Logistic Regression

Use logistic regression when the outcome has two categories, such as pass/fail or diagnosed/not diagnosed.

Logistic Regression
Variables
Participant ID [id]
Age in years [age]
▶
Dependent:1
Passed exam [passed]
Block 1 of 1
▶
Covariates:2
Revision hours [hours]
Anxiety [anxiety]
Method: Enter
Categorical…3Save…Options…4Style…Bootstrap…
OKPasteResetCancelHelp
  1. 1
    DependentA variable with exactly two values, coded 0 and 1. SPSS predicts the chance of the higher code (1 = pass).
  2. 2
    CovariatesSPSS’s word for predictors here, whatever their type.
  3. 3
    Categorical…Declare any categorical predictors (such as gender) so SPSS creates dummy variables.
  4. 4
    Options…Tick Hosmer-Lemeshow goodness-of-fit and CI for exp(B).

Reading logistic output

Ignore Block 0. Everything you report is in Block 1.

Output1 [Document1] – SPSS Statistics Viewer
FileEditViewDataTransformAnalyzeGraphsUtilitiesExtensionsWindowHelp
Output
Log
Logistic Regression
Block 1: Method = Enter
Omnibus Tests
Model Summary
Hosmer and Lemeshow Test
Classification Table
Variables in the Equation
Omnibus Tests of Model Coefficients
Chi-squaredfSig.
Model38.4212.000
Model Summary
Step−2 Log
likelihood
Cox & Snell
R Square
Nagelkerke
R Square
1163.37.226.3062
Hosmer and Lemeshow Test
StepChi-squaredfSig.
16.128.6343
Variables in the Equation
BS.E.WalddfSig.Exp(B)
hours.182.04119.711.0001.2004
anxiety−.095.0347.811.005.9095
Constant−.840.6201.841.175.432

Dependent variable: passed (0 = fail, 1 = pass)

  1. 1
    Omnibus testThe model predicts better than chance: χ²(2) = 38.42, p < .001.
  2. 2
    Nagelkerke R SquareA pseudo R²: the model explains roughly 31% of the variation. Don’t read it exactly like R² in linear regression.
  3. 3
    Hosmer-LemeshowHere you want non-significant. p = .634 means the model fits the data well.
  4. 4
    Exp(B) above 1The odds ratio. Each extra hour of revision multiplies the odds of passing by 1.20, a 20% increase.
  5. 5
    Exp(B) below 1Each extra anxiety point multiplies the odds by .909, about a 9% decrease.

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.

More in Advanced regression