Logistic Regression in Clinical Research: A Practical Guide
How to run logistic regression for clinical studies: univariable to multivariable models, odds ratios, events per variable and multicollinearity.
Logistic regression models a binary outcome (for example death yes/no, complication yes/no) as a function of one or more predictors, and reports results as odds ratios with 95% confidence intervals. In clinical research it is typically run in two stages: a univariable analysis for each candidate predictor, then a multivariable model that estimates each predictor's association with the outcome after adjusting for the others. The method is standard, but the choices you make about variables, sample size and model checks determine whether the results are trustworthy.
Which model is right depends on your study design and the journal's requirements, so treat this guide as a framework, not a rulebook.
When logistic regression is appropriate
- The outcome is binary (or can be defined as binary with a clinical rationale).
- Observations are independent. Repeated or clustered data need other models.
- You want to adjust for confounders, identify associated factors, or build a risk model.
If the outcome is time-to-event with censoring, survival methods such as Cox regression are usually more appropriate. If the outcome is continuous, use linear regression. If the outcome has several ordered categories, consider ordinal logistic regression.
From univariable to multivariable
- Describe the data. Check missing values, ranges and group sizes. Make sure the outcome coding is clear (1 = event, 0 = no event).
- Run univariable models. Fit one predictor at a time to see crude odds ratios.
- Choose candidate variables for the multivariable model. Some researchers use a screening threshold on the univariable p-value (often 0.10 or 0.20); others pick from clinical knowledge and the causal diagram. The second approach is generally preferred, because screening by p-value can discard true confounders. Include variables known to matter clinically even if not significant in the univariable step.
- Fit the multivariable model. Enter the chosen variables together, or use a pre-specified strategy. Automated stepwise selection is widely criticised for biased coefficients and over-optimistic p-values; if you use it, say so and consider validation.
- Check the model. See the diagnostics below.
- Report adjusted odds ratios with 95% confidence intervals.
Interpreting odds ratios
| Odds ratio | Meaning (per one-unit increase, or versus the reference category) |
|---|---|
| Greater than 1 | Higher odds of the outcome |
| Equal to 1 | No association |
| Less than 1 | Lower odds of the outcome |
Points to remember:
- An odds ratio is not a risk ratio. When the outcome is common (for example more than about 10%), odds ratios exaggerate the apparent effect compared with relative risk. Avoid describing an OR of 2 as "twice as likely" in that situation.
- For a continuous predictor, the OR is per one unit. Rescale where useful, such as per 10 years of age, so it reads clearly.
- For a categorical predictor, state the reference group.
- The confidence interval shows precision. An interval that includes 1 is consistent with no association at the 5% level.
- The OR is adjusted in the multivariable model: it is the association holding the other variables constant, not a causal effect unless the design supports that.
Events per variable (EPV)
A frequently cited guideline is at least 10 events per candidate predictor, where "events" means the number in the less frequent outcome category and "predictors" counts every parameter you consider, including dummy variables and any you screened out. With 60 events, a model with more than about 6 candidate parameters is at risk.
Too few events lead to overfitting, unstable or inflated odds ratios, and wide confidence intervals. The 10 EPV rule is an approximation; newer approaches suggest calculating the minimum sample size based on the expected model performance and the number of parameters. If you are developing a prediction model, consult the relevant guidance (such as TRIPOD) and consider a statistician.
Possible remedies if EPV is low: reduce the number of candidate predictors using clinical reasoning, combine related variables, collect more data, or use penalised regression.
Multicollinearity
When two predictors are strongly correlated (for example BMI and body weight, or systolic and mean arterial pressure), the model cannot separate their effects. Symptoms include inflated standard errors, odds ratios that change drastically when one variable is added or removed, and coefficients with implausible signs.
How to check and handle it:
- Look at the correlation matrix of predictors.
- Calculate the variance inflation factor (VIF). A VIF above roughly 5 to 10 is a common flag.
- Remove one of the correlated variables, combine them into a single measure, or choose the one with the clearer clinical meaning.
Other checks worth reporting
- Linearity: continuous predictors are assumed to have a linear relationship with the log odds. Check with categories or splines if in doubt.
- Goodness of fit: the Hosmer-Lemeshow test is common but has limitations; calibration plots are more informative.
- Discrimination: the area under the ROC curve (AUC) tells you how well the model separates cases from non-cases.
- Influential observations and separation: a predictor that perfectly predicts the outcome causes unstable estimates.
- Missing data: describe how it was handled instead of silently dropping rows.
Reporting checklist
- Number of patients and events, and the EPV.
- How variables were selected for the model.
- A table with crude and adjusted ORs, 95% CIs and p-values, and the reference categories.
- Assumption and fit checks, and discrimination or calibration if building a prediction model.
- Software and version.
- Cautious interpretation: association, not necessarily causation.
How to do this in MedStat
With MedStat AI statistics, you upload your dataset, specify the outcome, and the AI auto-selects the appropriate analysis, including regression, then returns tables, charts and p-values in one click. It is a zero-code, point-and-click workflow, and ROC analysis is supported for assessing discrimination; see no-code statistics for more. Check the variables entered, the events per variable and the model assumptions yourself, and confirm the final method against your study design and journal requirements.
Upload your data, let AI pick the right test, and get results and charts in one click.
Try MedStat
FAQ
How do I interpret an odds ratio from logistic regression?
An odds ratio above 1 means higher odds of the outcome for each one-unit increase in the predictor (or versus the reference category); below 1 means lower odds; 1 means no association. Always give the 95% confidence interval, and remember that odds ratios overstate risk ratios when the outcome is common.
How many events do I need for logistic regression?
A common rule of thumb is at least 10 events per candidate predictor variable (EPV), counting the smaller of the outcome categories. It is a guide, not a law, and more recent work suggests sample-size calculations tailored to the model. Fewer events raise the risk of overfitting and unstable estimates.
Should I use univariable p-value screening to choose variables for the multivariable model?
It is widely used but has drawbacks, as it can drop important confounders and keep spurious variables. Prefer selecting variables from clinical knowledge, such as known confounders, and use a liberal threshold such as 0.10 to 0.20 if screening is used.
How do I check multicollinearity in logistic regression?
Examine the correlations between predictors and calculate variance inflation factors (VIF). A VIF above about 5 to 10 is a common warning sign. Remedies include removing or combining highly correlated variables.