Skip to main content

首页 / Posts

【SPSS】Regression Analysis — Logistic Regression: Binary Logistic Regression

This article explains how to perform binary logistic regression analysis, covering chi-square tests, regression-equation setup and interpretation, and model goodness-of-fit and significance testing, helping readers understand regression-model applications in data analysis.

Rosetears·
··743 words·4 mins

Steps
#

  1. Chi-square test: you can first run a chi-square test to analyze whether there are significant relationships among variables.

  2. Choose the analysis method: click Analyze -> Regression -> Binary Logistic... in the menu bar to open the binary logistic regression dialog box.

  3. Set variables:

    • Dependent variable (Dependent): drag the binary dependent variable into this box.
    • Covariates: drag the independent variables into this box.
  4. Set dummy variables (categorical variables), if any:

    • Click the Categorical button and add categorical independent variables to the Categorical Covariates box.
    • In Reference Category, choose “First” or “Last” as the reference category, then click Change.
  5. Set options:

    • Click the Options button and select Hosmer-Lemeshow goodness-of-fit (H) and CI for Exp(B): 95%. These options help evaluate model fit.

Explanation
#

Model Summary
#

The model summary includes several indicators for estimating goodness of fit. Larger values indicate better fit. The Cox-Snell R-squared value provides a way to estimate model fit, but because its upper limit is usually below 1, the Nagelkerke R-squared value adjusts it to make the range more intuitive, from 0 to 1. This adjustment makes R-squared easier to interpret.

Hosmer-Lemeshow Test
#

Significance > 0.05: this test result indicates that the data fit is good, and the model can truly and effectively reflect the relationships among the original variables. In other words, the model assumptions are not rejected by the data, so the model results can be considered relatively credible.

Classification Table
#

The classification table shows the model’s prediction accuracy. It is usually evaluated by the “overall percentage,” which represents how accurately the model classifies the data. For example, if the overall percentage is high, the model performs well in prediction.

Variables in the Equation
#

In regression analysis, the significance level, or p-value, is an important indicator for measuring a variable’s effect on the dependent variable. If an independent variable’s p-value is greater than 0.05, the variable is statistically nonsignificant and may not have a significant effect on the dependent variable. In that case, consider removing it from the model.

Exp(B) reflects the size and direction of the independent variable’s effect on the dependent variable.

However, when constructing the regression equation, B should still be used as the basis.


Regression Equation
#

In regression analysis, two forms of regression equations are commonly used: the standard log-odds model and the odds model.

Standard Log-Odds:
#

$$ \ln \left( \frac{p}{1 - p} \right) = \beta_0 + \beta_1 \cdot X_1 + \beta_2 \cdot X_2 + \dots + \beta_n \cdot X_n $$

Odds Model:
#

$$ \frac{p_i}{1 - p_i} = e^{\beta_0 + \beta_1 X_1 + \beta_2 X_2 + \cdots + \beta_n X_n} $$

Example:
#

Assume the regression equation is as follows:

$$ \begin{array}{l} \ln\left( \frac{p}{1 - p} \right) = 0.860 - 0.121 \cdot \text{female} - 0.486 \cdot \text{grade 1} - 0.184 \cdot \text{grade 2} \

  • 0.446 \cdot \text{grade 3} + 0.043 \cdot \text{grade 4} + 21.053 \cdot \text{grade 5} - 0.309 \cdot \text{hedonic motivation} \
  • 0.305 \cdot \text{price value} + 0.458 \cdot \text{personal innovativeness} - 0.612 \cdot \text{behavioral intention} \end{array} $$

$$ \frac{p}{1 - p} = $$

$$ \begin{array}{l} e^{0.860 - 0.121 \cdot \text{gender} - 0.486 \cdot \text{grade 1} - 0.184 \cdot \text{grade 2} \

  • 0.446 \cdot \text{grade 3} + 0.043 \cdot \text{grade 4} + 21.053 \cdot \text{grade 5} - 0.309 \cdot \text{hedonic motivation} \
  • 0.305 \cdot \text{price value} + 0.458 \cdot \text{personal innovativeness} - 0.612 \cdot \text{behavioral intention}} \end{array} $$

Result Interpretation
#

1. Table Interpretation:
#

  • R-squared: a high R-squared value indicates good model fit and reflects the explanatory power of the independent variables for the dependent variable.
  • Hosmer-Lemeshow test: if the significance value is greater than 0.05, the model has good goodness of fit, and the relationship between the data and the model is credible.
  • Regression equation: Exp(B) in the model helps judge the effect strength and direction of each independent variable on the dependent variable. If Exp(B) is greater than 1, the variable has a positive effect on the dependent variable; if it is less than 1, it has a negative effect.

2. Regression Equation Explanation:
#

The regression equation provides a quantitative relationship between the independent variables and dependent variable. Exp(B) further helps judge the specific effect of each variable on the predicted result. For example, the coefficients and Exp(B) values of variables such as gender, grade, and hedonic motivation reflect their importance and direction of effect when predicting the dependent variable.


Click this text to watch the video version of this article

Related

Regression Analysis — Differences Among Three Types of Logistic Regression

··453 words·3 mins
This article introduces three common logistic regression models: binary logistic regression, multinomial logistic regression, and ordered logistic regression. It explains their applications and differences for different dependent-variable types, helping readers understand when to use these statistical models in real analysis.

【SPSS】Regression Analysis — Linear Regression

··757 words·4 mins
This article introduces the main differences between linear regression and logistic regression, and explains the steps, result interpretation, and common statistics in regression analysis, such as R-squared, the Durbin-Watson value, and regression coefficients, helping readers understand how to use regression models for data analysis.

【SPSS】Correlation Analysis

··499 words·3 mins
This article introduces how to use SPSS for correlation analysis and how to interpret correlation matrices and heatmaps, helping readers quickly master correlation-analysis methods and result interpretation among scale dimensions.

【SPSS】Difference Analysis

··1475 words·7 mins
This article explains independent-samples t tests and one-way analysis of variance (ANOVA) in difference analysis, including SPSS operation steps, homogeneity-of-variance testing, t-value analysis, and result interpretation, helping readers understand how to compare mean differences between groups in data analysis.

【SPSS】Normality Test

··268 words·2 mins
This article introduces how to use SPSS for descriptive statistical analysis, focusing on how to test normal distribution with histograms and Q-Q plots, helping users better understand data distributions and the analysis process.

【SPSS】Validity Analysis

··1081 words·6 mins
This article introduces common SPSS validity-analysis methods, including exploratory factor analysis, principal component analysis, and confirmatory factor analysis. It explains how to interpret the KMO test and factor loadings to help readers understand validity assessment in data analysis.

【SPSS】Descriptive Statistics

··3196 words·16 mins
SPSS descriptive statistics: including single-choice questions, multiple-choice questions, and crosstabs.