One of the most frequently asked questions in clinical research is this: "Do these factors affect the development of the disease, and which one is more important?" If you want to understand how multiple independent variables affect a binary outcome, sick/healthy, complication present/absent, mortality occurred/did not occur, logistic regression is the right tool.
When Is Logistic Regression Used?
Logistic regression is used when your dependent variable is binary. Unlike linear regression, logistic regression keeps probabilities between 0 and 1 and works over log-odds.
The most common areas of use in medicine:
- Identifying risk factors for disease development
- Detecting factors that affect treatment response
- Building a predictive model for mortality or complications
- Evaluating multiple markers in diagnostic accuracy studies
What Is the Odds Ratio and How Is It Interpreted?
The main output of logistic regression is the odds ratio (OR).
OR > 1: That variable increases the likelihood of the outcome occurring.
OR < 1: That variable decreases the likelihood of the outcome occurring (protective).
OR = 1: That variable has no effect.
If the 95% confidence interval does not include 1, it is statistically significant.
Example interpretation: "For smoking, OR = 3.2 (95% CI: 1.8–5.7, p < 0.001). The likelihood of developing a complication in smokers is 3.2 times higher than in non-smokers."
Do not confuse OR with Relative Risk (RR). Although OR and RR are close to each other, they are not equivalent, and especially in common events OR overstates RR. In case-control studies, RR cannot be calculated, so OR is used.
Univariate and Multivariate Analysis
Logistic regression is carried out in two stages:
Univariate (single-variable) analysis: The relationship of each factor with the dependent variable is examined separately. Variables below the p < 0.20 or p < 0.25 threshold are usually taken into the multivariate model.
Multivariate (multiple-variable) analysis: All significant factors enter the model at the same time. The independent effect of each variable is calculated while keeping the other factors under control.
The main purpose of multivariate analysis is to control for confounding factors. Analysis performed without controlling for factors such as age, sex, and comorbidity produces misleading results.
Model Evaluation
How good a logistic regression model is can be evaluated by several methods:
Hosmer-Lemeshow test: Tests the model's fit to the data. p > 0.05 indicates good fit.
Nagelkerke R²: The proportion of variance explained by the model. The counterpart of R² in linear regression.
ROC curve and AUC: The predictive power of the model. AUC > 0.70 is acceptable, > 0.80 is good.
Classification table: The percentage of correct classification. The cutoff is usually taken as 0.5.
Logistic Regression with SPSS
In the output table, "B" is the coefficient, while "Exp(B)" is the OR value.
Logistic Regression with R
You can create publication-quality tables with the gtsummary package:
Request a 30-minute free consultation for logistic regression analysis and interpretation.
Where Do People Get Stuck Most in This Analysis?
- You cannot decide which variables to take from univariate analysis into the multivariate model.
- OR came out as 0.45, but you do not know how to express in the article that this is "protective."
- Hosmer-Lemeshow came out as p < 0.05, the model fit is poor, but what to do is unclear.