METHOD GUIDE
Simple Logistic Regression in SPSS
Outcome Coding, Exp(B) and Fit Checks
One binary outcome and one predictor give a single odds ratio, and what it says depends on which outcome category SPSS treats as the event. The encoding table, the omnibus test and the fit statistics decide whether that odds ratio can be reported.
IN SHORT
What the Odds Ratio Describes and What It Does Not
A logistic regression with one predictor models the probability of a binary outcome, such as relapse or course completion, and its slope lives on the log-odds scale, so the result is reported as an odds ratio with its confidence interval. It needs independent observations and an outcome with two categories. To run a binary logistic regression in SPSS with one predictor, open Analyze, Regression, Binary Logistic, place the outcome under Dependent and the predictor under Covariates, declare a categorical predictor under Categorical, and request CI for Exp(B) and the Hosmer-Lemeshow test under Options (labels vary by version). OnlineSPSS, a specialist statistical consultancy for academic, clinical and professional research, carries out and reviews this analysis through an in-house PhD-level statistician.
ANALYSIS SUPPORT
Analysis Support for This Method
Covariates usually join the model once the first association is known, and an outcome that is rare in one category calls for a different estimator.
Logistic Regression
The logistic model fitted within your study design, with the coding of the outcome, the choice of covariates, the fit checks and the odds ratios reported with intervals agreed for your data.
Firth's Logistic Regression
A penalized estimate for when an outcome category is rare, or a predictor almost separates the groups, and the ordinary coefficients become unstable.
BEFORE YOU RUN IT
Settling the Event Code and the Predictor Unit
SPSS models the higher-coded category, so the meaning of every Exp(B) is fixed in the data file, not in the dialog.
Which Category Is the Event SPSS models the probability of the higher-coded outcome category, shown in the Dependent Variable Encoding table. Check that this is the outcome of interest, or every odds ratio is inverted.
Scale and Shape of the Predictor A continuous predictor gives one odds ratio per unit and assumes a straight line on the log-odds scale, which is checked before reporting. Rescale to a meaningful unit, and name the reference group of a categorical predictor.
Events, Not Rows Stability depends on the number of cases in the smaller outcome category, not on the total sample. With few events even one predictor gives wide intervals, and a rare category may need a penalized method.
One Row per Case Each row should be one independent case. Repeated measures on one person, or patients clustered in clinics, need a model that handles the correlation, because the standard errors here would be too small.
IN SPSS
How to Run Simple Logistic Regression in SPSS
The outcome is coded 0 and 1 before the Regression menu of IBM SPSS is opened, and dialog wording can differ by version.
- Code the outcome 0 and 1, with 1 as the event of interest, and label both values.
- Choose Analyze, Regression, Binary Logistic, then place the outcome under Dependent and the predictor under Covariates.
- If the predictor is categorical, open Categorical, move it across and set the reference category.
- Under Options, tick CI for Exp(B) and Hosmer-Lemeshow goodness-of-fit.
- Run the model and check the Dependent Variable Encoding table before reading anything else.
- Read Omnibus Tests of Model Coefficients, Model Summary, Hosmer and Lemeshow Test and Variables in the Equation, in that order.
READING THE OUTPUT
Which Logistic Tables Decide Whether Exp(B) Can Be Read
Variables in the Equation holds the result, but the encoding table, the omnibus test and the fit test decide whether that result can be read as intended.
| Output element | What it tells you | What to check |
|---|---|---|
| Dependent Variable Encoding | The original outcome values and the internal 0 and 1, where 1 is the event being modeled | That the internal 1 is the outcome of interest, since otherwise every sign is reversed |
| Block 0: Beginning Block | The model with a constant only, and the classification it gives by always predicting the larger category | That this baseline accuracy is the figure any later accuracy is compared with |
| Omnibus Tests of Model Coefficients | A likelihood-ratio chi-square for the model against the constant-only model | That it is reported with its degrees of freedom as the test of the predictor in a one-predictor model |
| Model Summary | The -2 Log likelihood, Cox & Snell R Square and Nagelkerke R Square | That both R squares are pseudo values and are not read as variance explained |
| Hosmer and Lemeshow Test | A comparison of observed and predicted events across groups of cases ordered by predicted risk | That a nonsignificant p-value is not proof of good fit, because the test has low power and depends on the grouping |
| Classification Table | The cases assigned correctly at the default cutoff of 0.5 | That accuracy depends on the cutoff and the event rate, and is not a measure of discrimination |
| Variables in the Equation: B and Exp(B) | The slope on the log-odds scale and the odds ratio for a one-unit step or against the reference group | That Exp(B) is written as an odds ratio, not as a risk ratio or a change in probability |
| 95% C.I.for EXP(B) | The interval for the odds ratio, printed when requested under Options | That very wide limits, or limits near zero and infinity, are read as a sign of sparse data |
REPORTING
Writing Up the Odds Ratio From a One-Predictor Model
The event category and the unit of the predictor come first, because the odds ratio cannot be read without them.
Name the outcome and the event category, then give OR = ___, 95% CI [___, ___], p = ___, with the unit of the predictor or the reference group stated. For a continuous predictor, rescale first if one unit is too small to mean anything. Add the likelihood-ratio test from the Omnibus Tests table as χ²(df = ___, N = ___) = ___, and label Nagelkerke R² = ___ as a pseudo R squared. If fit is reported, give the Hosmer-Lemeshow χ²(df = ___) = ___, p = ___ with a plain statement that it does not confirm the model is adequate. SPSS prints the interval for the odds ratio when it is requested, but none for the R squared values, so any interval for them comes from another program. Describe the result as an association with the odds of the outcome, and use the word effect only when the design supports it.
COMMON MISTAKES
Logistic Regression Slips That Reverse or Inflate a Result
Most problems with a one-predictor model arise in the coding before it runs, or in the sentence that describes the odds ratio after it.
Event Coded Backwards Entering the outcome with the wrong category as the higher value turns a risk factor into a protective factor on paper. The encoding table is read before the coefficient.
Odds Read as Probability An odds ratio of 2 does not mean twice the probability. The two nearly agree only when the outcome is rare, and the wording states that the odds are compared.
Pseudo R Squared as Variance The Cox & Snell and Nagelkerke values rescale a likelihood ratio and do not measure explained variance, so they are labeled as pseudo values and not compared with linear models.
Fit Test as Proof A nonsignificant Hosmer-Lemeshow result is taken to prove the model right. With limited power and a grouping that changes the answer, it is one calibration check beside a calibration plot and a measure of discrimination.
Accuracy Without a Baseline Percent correct looks high when one outcome is common, since always predicting it already scores well. Compare with Block 0 and report sensitivity, specificity or the area under the ROC curve.
Instability Ignored Standard errors in the hundreds, or a warning that estimation did not converge, signal that a predictor value almost perfectly predicts the outcome. Such coefficients are not reported as found.
Odds ratios already in your draft? Independent Statistical Review checks the event coding, the odds ratio wording and the fit statements before you submit.
FREQUENTLY ASKED QUESTIONS
Questions About Logistic Regression in SPSS Output
Three tables cause most of the doubt in a one-predictor logistic model, and each of the first three answers deals with one of them.
How do I make SPSS model the outcome I care about?
SPSS treats the higher-coded value of the outcome as the event, so recode before running if the event is currently the lower value. The Dependent Variable Encoding table shows which original value became 1. Reversing the coding changes the sign of B, turns Exp(B) into its reciprocal and inverts the interval, so a result that looks protective can become a risk, and the table is checked before the output is read.
How do I read the Exp(B) odds ratio in SPSS for a continuous predictor?
Exp(B) is the multiplicative change in the odds of the event for each one-unit increase in the predictor. A value above 1 means higher odds and a value below 1 lower odds, while the interval in the 95% C.I.for EXP(B) columns shows how precisely it is estimated. If a single unit is not meaningful, recode the predictor in larger steps, because the odds ratio and both interval limits for k units are the one-unit values raised to the power k.
What does the Hosmer-Lemeshow test in SPSS tell me?
It compares observed and predicted events across groups of cases ordered by predicted risk, and a nonsignificant p-value shows only that no clear lack of fit was detected. The test usually uses ten groups, has little power in small samples and flags trivial differences in large ones. With a single binary predictor there are only two predicted probabilities, so the model reproduces the two observed proportions exactly and the test has nothing to assess. Report it beside discrimination and a look at calibration, not alone.
Can OnlineSPSS check the coding and odds ratios in my logistic model?
Yes. An in-house PhD-level statistician can check how the outcome and predictor are coded, confirm the event category and the interval you report, or carry out the model on your data from the start. If only the presentation remains, Results Reporting & Interpretation prepares the odds ratio table and its wording from your output. What the odds ratio is taken to mean remains your decision.
How do you protect my research data and confidentiality?
Your data and project details are handled confidentially, and project information is not published. Researcher names and institutions are not used publicly without permission. An NDA is available where required and can be arranged before sensitive materials are shared. Read more about confidentiality and data security.
What happens when I request an assessment, and how long does it take?
You share your research question, design and relevant materials, such as the dataset or the output you have, and a statistically trained Research Coordinator reviews the request and responds the same day. The analysis, deliverables, timeline and one fixed project fee are then confirmed before any work begins, so the timeline follows from the agreed scope.
Still have a question? Find more answers in our full FAQ.
NEXT STEP
Is Your Odds Ratio
Pointing the Right Way?
Include how the outcome and predictor were coded, the count in each outcome category and your Variables in the Equation table. The assessment then confirms what the model work will cover.
No Commitment Required
Strictly Confidential
Fixed Project Fee
In-House PhD-Level Statisticians
Same-Day Response
Serving Researchers Since 2014