
How to Run Logistic Regression in SPSS from A to Z
When to use logistic regression
Use logistic regression when your dependent variable is a categorical outcome, usually with two states such as yes or no, purchase or no purchase, or retention or churn. In a binary model, the outcome variable must be coded as two values, usually 0 and 1. The independent variables can be quantitative, ordinal, or categorical variables that have been coded appropriately.
For example, suppose your study tests whether income, age, and satisfaction affect the likelihood that a customer will repurchase. In that case, Repurchase = 1 and Repurchase = 0 are the dependent variable. The research question is: does variable X change the likelihood that outcome Y will occur?
Logistic regression estimates the probability that an outcome will occur and then converts that probability into log odds. This is why the output includes columns such as B, S.E., Wald, df, Sig. and Exp(B), rather than only coefficients and p-values as in linear regression.
You need to distinguish this procedure from linear regression. Linear regression is appropriate when the dependent variable is a continuous quantitative value, such as an average purchase-intention score. Logistic regression is appropriate when the outcome to be predicted belongs to one of two groups. If you are unsure which procedure to use, check the nature of the dependent variable before opening SPSS.
Prepare your data before running the model
Check how the dependent variable is coded
Open Variable View and check the dependent variable. For binary logistic regression, this variable must have two groups. You can use codes 0 and 1, where 1 represents the outcome that the model is intended to predict. For example, Y = 1 can mean that the customer intends to purchase, while Y = 0 means that the customer does not yet intend to purchase.
Do not enter the words Yes and No and place them directly into the model. Create a new numeric variable if the current data are stored as text. In Values, define the labels for 0 and 1 clearly so that you do not reverse the direction of the outcome when reading the data.
Check independent variables and the reference group
A quantitative independent variable may be the average score of a scale, age, income, or number of purchases. Categorical variables such as gender, region, or customer group need to be coded and assigned a reference group. SPSS creates dummy variables for a categorical variable when you place it in the Categorical box.
If an independent variable is an average score calculated from several items, complete the scale assessment first. Check reverse-coded items, run Cronbach's Alpha, and calculate the representative score according to your study procedure. Putting individual items that have not been assessed into the logistic model can make the model difficult to interpret.
Handle missing data and unusual observations
Go to Analyze > Descriptive Statistics > Frequencies to check missing values and codes such as 99, 999, or other designated codes. SPSS must not interpret these codes as real values. Declare them as missing or replace them according to the procedure stated in your research methods.
Check whether the dependent variable contains both groups. If every observation is 0 or every observation is 1, SPSS cannot estimate a binary model. You should also inspect the frequency of each group. A group with very few observations can produce very large coefficients, large standard errors, or a model that does not converge.
Independent variables with very strong correlations can also make interpretation difficult. You can consult what multicollinearity is to check VIF and tolerance using an auxiliary regression model. According to (Hair et al., 2019), VIF below 5 is commonly used when reporting PLS-SEM, but when you apply this check to logistic regression, you still need to explain why the diagnostic is appropriate for your model.
Steps to run logistic regression in SPSS
Step 1: Open Binary Logistic Regression
From the menu bar, select Analyze > Regression > Binary Logistic.... The Logistic Regression dialog box appears. Move the binary outcome variable into Dependent, then move the predictor variables into Covariates.
If an independent variable is categorical, do not let SPSS treat it as a continuous variable. Select Categorical..., move the categorical variable to the box on the right, and select the reference group under Contrast. You can usually select First or Last, but you must state clearly which group is being used as the comparison baseline.
Step 2: Choose how variables enter the model
Under Method, Enter places all independent variables into the model at the same time. This is usually easier to defend when the variables were proposed by the theoretical model and research hypotheses.
The Forward and Backward methods can select variables based on statistical criteria. Use them carefully because the final model may no longer reflect the full set of original hypotheses. If your thesis has a predefined research model, Enter is usually preferable, and you should explain the basis for selecting the variables.
Step 3: Select the required statistics and plots
Select Options... and tick CI for exp(B) so that SPSS displays the confidence interval for Exp(B). You can keep the default 95% level if your proposal does not specify another level. Tick Hosmer-Lemeshow goodness-of-fit to view an additional goodness-of-fit test.
In the same dialog box, select Classification plots if you need to inspect predicted classifications. You can select Casewise listing of residuals to check observations with large residuals. You do not need to select every option if the output becomes too long. Keep the tables that answer your research question.
Step 4: Set classification probabilities and run the model
The Save... button allows you to save predicted probabilities or predicted groups in Data View. If you only need to test the effects of the independent variables, you may not need to save these variables yet. After checking your selections, click Continue, then click OK.
SPSS usually produces the tables Omnibus Tests of Model Coefficients, Model Summary, Hosmer and Lemeshow Test, Classification Table and Variables in the Equation. Save the .spv file and record the data version, the variables entered into the model, and whether you used the Enter method or another method.
Reading the output
Reading Omnibus Tests of Model Coefficients
The Omnibus Tests of Model Coefficients table tests whether the model with independent variables performs better than a model containing only the constant. Focus on the Sig. column in the Model row. If the p-value is below the selected significance level, there is evidence that the set of independent variables improves the model compared with the null model.
This table does not tell you which variable has an effect. To draw a conclusion about each hypothesis, you must read Variables in the Equation.
Reading Model Summary and Hosmer-Lemeshow Test
Model Summary usually contains -2 Log likelihood, Cox & Snell R Square and Nagelkerke R Square. The two pseudo R Square measures should not be interpreted exactly like R² in linear regression. You can use them to describe the relative improvement or explanatory ability of the model, but you must use the correct name for each measure.
For Hosmer and Lemeshow Test, inspect the Sig. column and interpret it according to the methods reference required by your department. Do not look at one test and declare the model perfect. Read the Omnibus Test, classification table, pseudo R Square measures, and coefficients together.
Reading Variables in the Equation
This is the most important table when testing the effect of each variable. B is the coefficient on the log-odds scale. S.E. is the standard error, Wald is the test statistic, df is the degrees of freedom, Sig. is the p-value, and Exp(B) is the odds ratio.
The example below uses simulated values only to help you identify the columns in SPSS output. It is not the result of an actual study.
Variables in the Equation, illustrative output
| Variable | B | S.E. | Wald | df | Sig. | Exp(B) | 95% C.I. for Exp(B), Lower | Upper |
|---|---|---|---|---|---|---|---|---|
| Satisfaction | 0.742 | 0.218 | 11.578 | 1 | 0.001 | 2.100 | 1.369 | 3.221 |
| Income | 0.315 | 0.141 | 4.994 | 1 | 0.025 | 1.370 | 1.039 | 1.806 |
| Age | -0.086 | 0.039 | 4.862 | 1 | 0.027 | 0.918 | 0.851 | 0.991 |
| Constant | -2.416 | 0.781 | 9.568 | 1 | 0.002 | 0.089 |
In the example, Satisfaction has Sig. = 0.001, a positive B coefficient, and Exp(B) = 2.100. Read this as follows: when the satisfaction score increases by one unit, the odds of outcome Y = 1 are estimated to increase by an odds ratio of 2.100, holding the other variables constant. This is an interpretation of odds, so do not write that the probability increases by exactly 210%.
For Age, B is negative and Exp(B) = 0.918. The odds of outcome Y = 1 tend to decrease when age increases by one unit, assuming the other conditions remain constant. If a categorical variable has several groups, each row is compared with the reference group selected under Categorical....
Classification Table reports the percentage of correctly classified cases using the default probability threshold. This measure can be affected when the two groups are very different in size, so do not use it alone to conclude that the model is good.
Evaluation criteria
Decide in advance on the significance level, the coding of Y, the reference group, and the criteria for reading the output. The table below is a practical checklist. The source column uses only references from the approved citation list.
| Item to inspect | Where to read it in SPSS | Reporting criterion or principle | Source |
|---|---|---|---|
| Dependent variable | Dependent | Two groups are clearly coded, usually as 0 and 1 | (Field, 2013) |
| Overall model significance | Omnibus Tests of Model Coefficients, Sig. column | Compare the p-value with the significance level selected in advance | (Field, 2013) |
| Significance of each variable | Variables in the Equation, Sig. column | Compare the p-value with the study's significance level | (Field, 2013) |
| Direction of the effect | B column | Positive B indicates an increase in log odds, while negative B indicates a decrease | (Field, 2013) |
| Odds ratio | Exp(B) column | Interpret it as an odds ratio, not as a percentage change in probability | (Field, 2013) |
| Confidence interval | 95% C.I. for EXP(B) | Report the lower and upper limits together with Exp(B) | (Field, 2013) |
| Multicollinearity | VIF from an auxiliary diagnostic model | VIF below 5 is the threshold stated in the PLS-SEM literature | (Hair et al., 2019) |
| Regression sample size | Total observations and number of predictors | You can compare it with the rule of n at 50 + 8m or above | (Tabachnick and Fidell, 2013) |
These thresholds do not replace reading the research design. In particular, do not use CFI, TLI, or RMSEA from CB-SEM to evaluate binary logistic regression. Those measures belong to covariance-based structural model assessment and are not standard tables for this procedure.
How to write this in your thesis
Write the results in this order: overall model significance, fit or classification performance, and then each independent variable. Always name the table and report the coefficient, p-value, and Exp(B) when interpreting the odds ratio. For a variable that is not statistically significant, report the actual result instead of searching for an explanation that supports the hypothesis.
You can adapt the following paragraph using your actual values: “The logistic regression results show that the model containing [names of variables] [is/is not] statistically significant compared with the constant-only model, with p-value = [value]. In the Variables in the Equation table, variable [X] has B = [value], p-value = [value], and Exp(B) = [value]. Because the p-value is [smaller than/larger than] [significance level], hypothesis H[ ] is [accepted/not supported].”
If your study uses a reference group, add this sentence: “Compared with [reference group], [comparison group] has [higher/lower] odds of [outcome Y = 1], with Exp(B) = [value], holding the other variables constant.” Fill in the numbers only after checking the coding and direction of the variable.
When you need to compare the general presentation of regression models, you can also consult linear regression model, linear regression equation, and solved linear regression exercises. These pages do not replace logistic output, but they can help you distinguish how coefficients, tests, and model variables are reported.
Common errors when running logistic regression
The first error is putting a dependent variable with more than two groups into Binary Logistic. If the outcome has three or more groups, review the research objective and the appropriate procedure. Do not force the data into a binary model by combining groups arbitrarily.
The second error is reversing the outcome coding. If 1 means “no purchase” but you write that the likelihood of purchase increases, the entire interpretation points in the wrong direction. Check Value Labels, the frequency table, and the event group before interpreting Exp(B).
The third error is looking only at Sig. and ignoring B, Exp(B), and the confidence interval. A small p-value provides statistical evidence at the selected level, but it does not tell you the direction or size of the relationship. Your report needs all three parts.
The fourth error is using Forward or Backward to remove variables until the table looks attractive and then failing to record the procedure. If a variable was removed for statistical reasons, state which method was used and acknowledge the limitation of the result. For a model with predefined hypotheses, Enter is usually easier to explain.
The final error is copying the output tables into Chapter 4 without explaining them. Select the tables that directly answer the research question, use consistent table titles, and explain the reference group. SPSS provides the numbers, but your conclusion must follow the model and the coding used in the study.
Frequently asked questions
What is binary logistic regression in SPSS?
It is a procedure for predicting a dependent variable with two possible outcomes. SPSS estimates the relationship between the independent variables and the likelihood that the outcome coded as 1 will occur.
When should I use logistic regression instead of linear regression?
Use logistic regression when the dependent variable consists of two groups, such as yes or no. Use linear regression when the dependent variable is a score or continuous quantity. Look at the type of outcome variable before choosing the procedure, rather than choosing it based on the study title.
What is Exp(B) in logistic regression?
Exp(B) is the odds ratio calculated from the B coefficient. It describes how the odds of outcome Y = 1 change when an independent variable increases by one unit, or when one group is compared with the reference group.
Do not call Exp(B) a percentage increase in probability. Probability and odds are related, but they are not the same quantity.
What should I do if logistic regression does not converge?
First, check whether the dependent variable contains both groups, whether the smaller group has too few observations, and whether the independent variables contain missing values or error codes. Then check whether the predictors are highly correlated or whether a categorical group nearly separates the outcome completely.
You can run the model again after correcting data problems, but do not automatically delete a variable just because the model is not yet satisfactory. Record every change and discuss the issue with your supervisor if the error continues.
Do I need to run the Hosmer-Lemeshow test?
The Hosmer and Lemeshow Test table is commonly reported as an assessment of model fit. However, read it together with Omnibus Tests, Model Summary, Classification Table, and Variables in the Equation, rather than using one table to judge the entire model.
Open the .sav file again, check the 0 and 1 codes for the dependent variable, run the procedure through Analyze > Regression > Binary Logistic..., and save the Variables in the Equation table together with the selected criteria in your analysis record. If you need to run the analysis on your own data file, see DoThesis M4 analysis.