English

Logistic Regression in SPSS: Steps, Odds Ratios, and Interpretation

Logistic regression is used when the dependent variable is categorical, most often binary (0 and 1), such as adopting or not adopting a technology.

Logistic Regression in SPSS: Steps, Odds Ratios, and Interpretation
Contents
  1. What is logistic regression?
  2. What is logistic regression used for?
  3. What does the logistic regression equation look like?
  4. How to run logistic regression in SPSS
  5. How to interpret the SPSS output
  6. Omnibus test and pseudo R²
  7. Hosmer-Lemeshow test
  8. Classification table
  9. Coefficients and odds ratios
  10. Running logistic regression in Python
  11. Frequently asked questions
  12. When should logistic regression be used instead of linear regression?
  13. Does logistic regression require the classical assumptions?
  14. How large should the sample be?
  15. What is the difference between B and Exp(B)?
  16. What if the dependent variable has three or more categories?
  17. References

Versi bahasa Indonesia: Pengertian, Tutorial, dan Interpretasi Regresi logistik dengan SPSS

Short answer: logistic regression is used when the dependent variable is categorical, most often binary (0 and 1), such as adopting or not adopting a technology. Instead of predicting the value of Y, it models the probability that Y = 1 through the logit function. In SPSS, the analysis runs through Analyze, Regression, Binary Logistic, and the output is read in order: the omnibus test, Nagelkerke R², the Hosmer-Lemeshow test, the classification table, and finally the coefficients (B) and odds ratios (Exp(B)).

OutputDesired resultMeaning
Omnibus test of model coefficientsSig. < 0.05The predictors jointly affect Y
Nagelkerke R²Higher is better (0 to 1)Pseudo R², a rough measure of explanatory power
Hosmer-Lemeshow testSig. > 0.05The model fits the observed data
Classification tableHigh overall percentageShare of respondents classified correctly
Variables in the equationSig. < 0.05 per variableB for the equation, Exp(B) for odds ratios

What is logistic regression?

Logistic regression relates one or more independent variables to a categorical dependent variable. This is the key difference from linear and multiple regression, where the dependent variable is continuous. The categories are usually coded 0 and 1. The value 0 typically represents “no” or “not yet”, while 1 represents the outcome of interest in the study.

An undergraduate thesis at IPB University (2008) on carrot farmers in Tugu Selatan village, Bogor, provides a concrete example. The study examined the factors that influence farmers’ decisions to adopt organic farming. Farmers who had not adopted organic practices were coded 0, and farmers who had adopted them were coded 1. The full thesis is available in the IPB repository.

Because the dependent variable takes only the values 0 and 1, a straight line is unsuitable: it would predict values below 0 or above 1, which have no meaning as probabilities. Logistic regression solves this by modeling the probability that a respondent belongs to category 1, a value that always lies between 0 and 1.

What is logistic regression used for?

Logistic regression serves three broad purposes in applied research. Firstly, it estimates probabilities for new cases. A bank, for example, evaluates whether a loan applicant is likely to repay. The applicant’s income, existing debts, number of dependents, and employment status are entered into a model estimated from past borrowers, and the model returns a probability of repayment between 0 and 1. The bank then sets a threshold for approval.

Secondly, it describes how two groups differ. The organic farming study compared the characteristics of conventional and organic carrot farmers. The analysis showed that price was the decisive factor: organic farmers accepted lower yields because the premium price of organic carrots gave them higher incomes than conventional farmers.

Thirdly, it identifies the factors that influence a decision, which extends the second purpose into policy. When the significant factors are variables that policy can influence, such as price, credit, or extension, the results point to interventions. In the carrot study, the finding implies that a policy aiming to expand organic farming should keep the price of organic produce sufficiently above that of conventional produce. Thus, the third purpose links statistical results to practical recommendations.

What does the logistic regression equation look like?

SPSS and Minitab report coefficients that look similar to those of linear regression, yet they describe the log of the odds, not Y itself. Reading them as direct effects on Y is a common mistake.

SPSS Variables in the Equation table showing B coefficients and Exp(B) odds ratios
Column B gives the coefficients; column Exp(B) gives the odds ratios.

The model is written as ln[p / (1 − p)] = B0 + B1X1 + … + BkXk, where p is the probability that Y = 1, B0 is the constant, and B1 to Bk are the coefficients. The left-hand side is the logit, the logarithm of the odds.

Logistic regression equation written as the logit of p equal to a linear combination of predictors
The logit form of the logistic regression equation.

Solving for p gives the probability: p = 1 / (1 + e−(B0 + B1X1 + … + BkXk)). This equation is used to calculate the probability for any respondent whose values of X are known, and the result always lies between 0 and 1.

Formula for the probability p that Y equals 1 in logistic regression
Probability that Y = 1.

Consequently, the column used depends on the purpose. Column B is used to build the equation and to calculate probabilities, while column Exp(B) is used to discuss how each factor changes the odds.

How to run logistic regression in SPSS

The steps in SPSS are as follows: (1) open Analyze, Regression, Binary Logistic; (2) move the dependent variable into the Dependent box; (3) move the independent variables into the Covariates box; (4) click Categorical to declare any categorical predictors; (5) under Options, tick Hosmer-Lemeshow goodness-of-fit and CI for exp(B); and (6) select the Enter method and click OK.

SPSS menu Analyze Regression Binary Logistic
Analyze, Regression, Binary Logistic.
SPSS logistic regression dialog with dependent variable and covariates entered
Dependent variable and covariates.

The Enter method includes all variables at once and is the standard choice when the variables are chosen on theoretical grounds. Stepwise methods (forward or backward) are sometimes used for exploratory work, but their results should be treated as hypotheses rather than confirmed findings.

How to interpret the SPSS output

Omnibus test and pseudo R²

SPSS omnibus tests of model coefficients and model summary with Nagelkerke R square
Omnibus test and model summary.

The omnibus test checks whether the independent variables jointly improve the model compared with a model containing only the constant. A significance value below 0.05 indicates that the predictors simultaneously influence the dependent variable. In the example, Nagelkerke R² = 0.86. Nagelkerke R² is a pseudo R², an analogue of R² in linear regression; it is read loosely as the model explaining a large share of the variation in the outcome, rather than as an exact percentage of explained variance.

Hosmer-Lemeshow test

SPSS Hosmer and Lemeshow test table with significance above 0.05
Hosmer-Lemeshow test.

Unlike the omnibus test, the Hosmer-Lemeshow test is satisfactory when its significance value is above 0.05. The null hypothesis states that there is no difference between the predicted and observed frequencies. A non-significant result therefore means that the model fits the data adequately and can be used to describe the relationship between the independent and dependent variables.

Classification table

The classification table compares the predicted category of each respondent with the observed category, using a cut-off probability of 0.50. The overall percentage shows the share of respondents classified correctly. A model that classifies 85% of farmers correctly, compared with 60% for a model that simply predicts the larger group for everyone, adds real predictive value. Consequently, the overall percentage should always be compared with the share of the largest category, not with zero.

Coefficients and odds ratios

After the fit checks, each variable is examined in the Variables in the Equation table. A variable with Sig. < 0.05 significantly affects the outcome. The odds ratio Exp(B) describes how the odds of Y = 1 change when the variable increases by one unit. An odds ratio of 2.5 means that the odds of adopting organic farming are 2.5 times higher for each one-unit increase in the variable. An odds ratio of 0.40 means that the odds fall by 60%. An odds ratio of 1 means no effect.

An odds ratio is not a probability. A short scene illustrates the difference. A student explains during a seminar that farmers with extension contact are “2.5 times more likely” to adopt. The discussant notes that if the baseline probability is already 60%, the probability cannot be 2.5 times higher, since 150% is impossible. The correct statement concerns odds, not probability. Thus, odds ratios are best reported as “odds”, and predicted probabilities are calculated separately when a statement about probability is needed.

Running logistic regression in Python

import numpy as np
import pandas as pd
import statsmodels.formula.api as smf

df = pd.read_csv("organic_adoption.csv")
model = smf.logit("organic ~ price_premium + farm_size + extension + education", data=df).fit()
print(model.summary())
print(np.exp(model.params))   # odds ratios

Related guides on Catatan Budi: dummy variables in regression, multiple linear regression, and sample size for validity and reliability tests.

Frequently asked questions

When should logistic regression be used instead of linear regression?

Logistic regression is used when the dependent variable is categorical, such as yes or no, adopt or not adopt, or pass or fail. Linear regression is used when the dependent variable is continuous.

Does logistic regression require the classical assumptions?

Normality and homoscedasticity of residuals are not required. However, the observations should be independent, the predictors should not be highly collinear, and the relationship between continuous predictors and the logit should be approximately linear.

How large should the sample be?

A common rule requires at least 10 events per predictor variable, counted in the less frequent category. With 5 predictors and an outcome that occurs in 30% of cases, the sample should contain at least 50 events, or about 167 respondents.

What is the difference between B and Exp(B)?

B is the change in the log odds for a one-unit increase in X. Exp(B) is the odds ratio, the factor by which the odds are multiplied for that increase.

What if the dependent variable has three or more categories?

Multinomial logistic regression is used for unordered categories, and ordinal logistic regression for ordered categories, such as low, medium, and high.

References

  • Hosmer, D. W., Lemeshow, S., and Sturdivant, R. X. (2013). Applied Logistic Regression (3rd ed.). Wiley.
  • Nagelkerke, N. J. D. (1991). A note on a general definition of the coefficient of determination. Biometrika, 78(3), 691–692.
  • Peduzzi, P., Concato, J., Kemper, E., Holford, T. R., and Feinstein, A. R. (1996). A simulation study of the number of events per variable in logistic regression analysis. Journal of Clinical Epidemiology, 49(12), 1373–1379.

How to cite this article: Agung Budi Santoso (2026). Logistic Regression in SPSS: Steps, Odds Ratios, and Interpretation. Catatan Budi. https://agungbudisantoso.com/en/logistic-regression-spss/

Photo of Agung Budi Santoso

Written by

Agung Budi Santoso

Lecturer in Management & Agribusiness · Universitas Sumatera Utara

A lecturer and researcher who turns statistics, econometrics, and agribusiness research methods into practical, step-by-step notes for students and researchers.

Discussion

No comments yet. Have a question about this topic? Write it below and I will do my best to answer.

Leave a comment

Your email address will not be published.