Run Logistic Regression
Regression Methods

When to Use Logistic Regression in Medical Research: Complete Practical Guide

- 17 min read ... June 2025 Updated June 2025
S
StatClinic Editorial Team Statistical content for medical researchers and clinicians
Binary outcomes are the backbone of clinical research: a patient either develops diabetes or does not, survives to discharge or does not, is readmitted within 30 days or is not. Logistic regression is the method specifically designed for these yes/no situations allowing you to simultaneously examine multiple risk factors, control for confounders, and produce the adjusted odds ratios that journals, ethics committees, and systematic reviews expect. Yet despite its ubiquity, logistic regression is consistently misapplied wrong outcome type, too many variables, results misinterpreted, model assumptions never checked. This guide covers everything you need: when to use it, how to build the model correctly, what the output means, and how to report it.

What Is Logistic Regression?

Logistic regression is a statistical model that estimates the probability of a binary outcome from one or more predictor variables. The term "logistic" refers to the logistic (sigmoid) function a mathematical S-curve that maps any real-valued input to a probability between 0 and 1, which is essential when modeling yes/no outcomes that must remain within those bounds.

Unlike linear regression, which predicts a continuous outcome directly (Y = 2 + 2X), logistic regression models the log-odds (logit) of the outcome as a linear function of the predictors. The model is then transformed back into a probability using the logistic function.

The Logistic Regression Equation p = 1 / (1 + ez) where z = 2 + 2X + 2X + ... + 2X

Log-odds (logit): ln(p / (1p)) = 2 + 2X + 2X + ... + 2X
Odds Ratio for predictor X: OR = e2

The Logistic (Sigmoid) Function Constraining Predictions Between 0 and 1

Decision threshold (p = 0.5 default) Predict Outcome = 0 Predict Outcome = 1 0.0 0.25 0.5 0.75 1.0 6 3 0 3 6 Linear Predictor z (2 + 2X + ...) Predicted Probability p

The S-shaped curve illustrates the key advantage of logistic regression: no matter how extreme the predictor values become, the predicted probability is always constrained between 0 and 1 a mathematical property that linear regression cannot guarantee. The model automatically handles the non-linearity of probability at the extremes while maintaining a linear relationship in the middle range.

When to Use Logistic Regression The Decision Criteria

The single most important criterion for choosing logistic regression is the nature of your outcome variable. If the outcome is binary, logistic regression is almost always the correct choice. Everything else number of predictors, sample size, choice of software is secondary.

... Use logistic regression when...

  • Outcome is binary (yes/no, 0/1, event/no event)
  • You have 2 predictor variables to examine simultaneously
  • You need to adjust for confounders
  • You want adjusted odds ratios as output
  • You need to estimate probability of the outcome for individual patients
  • You are building a clinical prediction model or risk score
  • Outcome prevalence is 10% (OR RR) or you accept OR interpretation

Do NOT use logistic regression when...

  • Outcome is continuous (use linear regression)
  • Outcome is time-to-event with censoring (use Cox regression)
  • Outcome has 3+ ordered categories (use ordinal logistic)
  • Outcome has 3+ unordered categories (use multinomial logistic)
  • Observations are not independent (repeated measures, matched data use conditional/mixed-effects logistic regression)
  • You have fewer than 10 outcome events per predictor (overfitting risk)

Binary Outcomes in Clinical Research Examples

Clinical DomainBinary OutcomeTypical Predictors
Intensive careICU mortality (died vs survived)APACHE II, age, mechanical ventilation, vasopressors, sepsis
SurgerySurgical site infection (SSI yes vs no)Diabetes, BMI, operation duration, antibiotic timing
Cardiology30-day readmission after MI (yes vs no)Ejection fraction, age, HbA1c, creatinine, smoking
OncologyPathological complete response to neoadjuvant chemo (yes vs no)Tumour grade, HER2 status, tumour size, lymph node status
EndocrinologyType 2 diabetes development (yes vs no)BMI, family history, fasting glucose, hypertension, age
ObstetricsCaesarean delivery (yes vs no)Bishop score, maternal age, BMI, parity, previous CS
NephrologyAcute kidney injury in ICU (yes vs no)Pre-existing CKD, contrast exposure, sepsis, age, creatinine

Three Types of Logistic Regression Which One for Your Outcome?

TypeOutcome CategoriesClinical ExampleOutput
Binary Exactly 2 (yes/no) Diabetes: present vs absent Adjusted Odds Ratio (aOR)
Multinomial 3+ unordered categories Treatment response: complete / partial / none Relative Risk Ratio vs reference category
Ordinal 3+ ordered categories Pain: mild / moderate / severe; ECOG PS 04 Proportional Odds Ratio (assumes constant OR across cut-points)

Binary logistic regression is by far the most common type in clinical research and the focus of this guide. If your outcome is ordinal with clear ordering and the proportional odds assumption holds (test using the Brant test or score test in your software), ordinal logistic regression is more efficient than collapsing categories or running multiple binary models.

Understanding the Odds Ratio The Core Output

The primary output of logistic regression is the odds ratio (OR) for each predictor. Understanding what an OR means and what it does not mean is essential for correct interpretation and reporting.

The Odds Ratio Scale How to Read the Direction and Magnitude

OR < 0.5
Strong protective
0.50.8
Moderate protective
1
No effect
1.22.0
Moderate risk
OR > 2
Strong risk
Strongly protective
(reduces odds)
OR = 1
No association
Strongly increases
odds of outcome
Protective (OR < 1) Null (OR = 1) Risk factor (OR > 1)

Interpreting Odds Ratios in Practice

For a binary predictor (e.g., smoker vs non-smoker): OR = 2.14 means that smokers have 2.14 times the odds of the outcome compared to non-smokers, after adjusting for all other variables in the model. OR = 0.45 means exposed patients have 55% lower odds (1 0.45 = 0.55 = 55% reduction).

For a continuous predictor (e.g., age in years): OR = 1.08 means that for each one-year increase in age, the odds of the outcome increase by 8%, holding all other variables constant. If age were entered in 10-year increments, OR = 1.08 per year would be expressed as OR = 1.0810 = 2.16 per decade.

For a categorical predictor with multiple levels (e.g., ECOG PS 0/1/2/3): each level is compared to the reference category (usually the lowest or most common). OR for ECOG PS 2 vs 0 = 3.41 means patients with PS 2 have 3.41 times the odds compared to PS 0 patients.

The 95% Confidence Interval What It Tells You

Every OR must be reported with its 95% confidence interval. An OR of 2.14 (95% CI 0.875.26) is not statistically significant the CI includes 1.0, meaning zero association is consistent with the data. An OR of 2.14 (95% CI 1.483.09) is significant the CI excludes 1.0. A wide CI indicates an imprecise estimate (small sample or rare events). A narrow CI indicates a precise estimate (large sample or common events).

The OR Relative Risk trap When outcome prevalence exceeds approximately 10%, the odds ratio substantially overestimates the relative risk. An OR of 3.0 in a study where 40% of subjects experienced the outcome does not mean the exposed group has 3 times the risk the actual relative risk may be only 1.8. For common outcomes, consider reporting the adjusted risk ratio using modified Poisson regression (Poisson with robust variance), and never state "adjusted OR" as "adjusted relative risk" in the results text.

Five Key Assumptions to Check Before Running Logistic Regression

1

Binary dependent variable

The outcome must have exactly two categories, typically coded 0 (absence of outcome) and 1 (presence of outcome). Logistic regression cannot be applied to continuous, count, or multi-category outcomes without modification.

How to check: Simply confirm your outcome coding in your data. This is a design requirement, not a statistical test.
2

Independence of observations

Each patient in the dataset must contribute only one outcome independently. Paired or matched data, repeated-measures designs, or clustered data (multiple patients from the same hospital) violate this assumption and require conditional logistic regression or mixed-effects logistic regression instead.

How to check: Review your study design. If data are matched or clustered, standard logistic regression is inappropriate.
3

Adequate events per variable (EPV 10)

Logistic regression requires a minimum of 10 outcome events per predictor variable. With fewer events per variable, the model overfits regression coefficients become inflated, confidence intervals are too narrow, and results are unreliable and non-reproducible. This is arguably the most commonly violated assumption in published medical literature.

How to check: Count the number of patients who experienced the outcome (not total N). Divide by the number of predictors in your model. If EPV < 10, reduce the number of predictors.
4

No severe multicollinearity among predictors

When two or more predictors are highly correlated (e.g., serum creatinine and eGFR, or BMI and body weight), the model cannot reliably separate their independent effects. Standard errors inflate, confidence intervals widen abnormally, and regression coefficients become numerically unstable sometimes reversing sign between nearly identical models.

How to check: Calculate the Variance Inflation Factor (VIF) for each predictor. VIF > 5 is concerning; VIF > 10 indicates severe multicollinearity. Also inspect the correlation matrix before model entry.
5

Linearity of continuous predictors with the log-odds

Logistic regression assumes that continuous predictor variables have a linear relationship with the log-odds (logit) of the outcome. If a continuous predictor has a U-shaped or threshold relationship with the outcome, treating it as linearly contributing to the model will produce misleading results.

How to check: Box-Tidwell test (add an interaction term X - ln(X) for each continuous predictor non-significance confirms linearity). Alternatively, categorize suspected non-linear predictors into tertiles or quartiles, or use restricted cubic splines.
What logistic regression does NOT assume Unlike linear regression, logistic regression does not require: normally distributed predictor variables, normally distributed residuals, homoscedasticity (equal variance of residuals), or a linear relationship between predictors and the outcome itself (only with the log-odds). Do not run Shapiro-Wilk tests on your predictors before logistic regression it is neither required nor relevant.

How to Build a Logistic Regression Model Step by Step

1

Define the research question and binary outcome precisely

State exactly what you are modelling: "What are the independent predictors of 30-day all-cause mortality in patients with sepsis admitted to the ICU?" Specify the outcome event (mortality) and the time window (30 days). Ambiguous outcome definitions produce ambiguous results.

2

Select predictor variables a priori from clinical knowledge and literature

List all candidate predictors before analyzing data, based on biological plausibility and evidence from prior studies. Include known confounders regardless of whether they reach statistical significance in your dataset. Document your variable selection rationale in the methods section this is what reviewers audit most carefully.

3

Check EPV constraint how many predictors can your data support?

Count the number of patients in the less frequent outcome category (e.g., patients who died). Divide by 10 to get the maximum number of predictors. If you have 60 deaths in your dataset, you can include at most 6 predictor variables. Prioritize the most clinically important if you must reduce the list.

4

Run univariate logistic regression for each predictor (optional screening)

Run simple (one-predictor) logistic regression for each candidate variable to produce crude ORs. These will be reported alongside adjusted ORs in your results table, allowing readers to see which associations changed after adjustment direct evidence of confounding. Some researchers use p < 0.20 as a screening threshold, but always override screening for known confounders.

5

Enter all selected predictors simultaneously into the multivariable model

Use the "Enter" method (forced entry of all pre-specified variables simultaneously). Do not use stepwise methods as the primary strategy they produce overfit, unreplicable models. All variables you selected in step 2 should be in the model regardless of their univariate significance.

6

Check model fit and assess assumptions

Run the Hosmer-Lemeshow goodness-of-fit test (p > 0.05 = good fit the model adequately fits the data). Check VIF for multicollinearity. Examine the classification table and ROC/AUC. Check for influential observations using Cook's distance or hat values. Run Box-Tidwell test for continuous predictors if concerned about non-linearity.

7

Report crude ORs, adjusted ORs, 95% CIs, and model fit statistics

Present a standard results table showing both crude (univariate) and adjusted (multivariate) ORs with 95% CIs and p-values for every predictor. Report the Hosmer-Lemeshow test result, Nagelkerke R2, AUC, and total sample size with number of events. This is the minimum required by most journals.

Events Per Variable Rule
Max predictors = Events - 10
Count the number of patients who experienced the outcome (not total sample size)
Example: 85 deaths in 420 patients max 8 predictor variables
Conservative rule: Events - 20 (preferred for publication in high-impact journals)

Interpreting the Logistic Regression Output Table

Statistical software (SPSS, R, Stata, SAS) produces a standardized logistic regression output. Understanding each component prevents the most common reporting errors.

Output ComponentWhat It Tells YouWhat to Report
2 (B coefficient)The change in log-odds per unit change in the predictorUsually not reported in clinical papers convert to OR = e^2
S.E. (Standard error)Precision of the 2 estimateNot reported directly used to compute CI
Wald statisticTest statistic for whether 2 0Not typically reported report p-value
p-valueTest of whether the OR is significantly different from 1.0Always report; use exact values (p = 0.003), not p < 0.05
Exp(B) = ORThe adjusted odds ratio for that predictorAlways report with 95% CI
95% CI for Exp(B)Confidence interval around the OR; CI crossing 1.0 = non-significantAlways report both bounds
2 Log LikelihoodModel fit; lower is better; used for likelihood ratio testsReport change from null model if doing model comparison
Nagelkerke R2Pseudo-R2 approximate proportion of variance explainedAlways report alongside HL test
Hosmer-Lemeshow 2Goodness-of-fit test; p > 0.05 = adequate fitAlways report the chi-square value, df, and p-value
Classification tableOverall % correctly classified at 0.5 probability thresholdReport as supplementary context; not the primary metric
AUC (ROC)Discrimination how well the model separates events from non-eventsReport AUC with 95% CI

Three Worked Clinical Examples

1

Predictors of 30-Day Mortality in ICU Patients with Sepsis

Retrospective cohort - N = 487 patients - Events (deaths): 124 (25.5%) - EPV = 124/6 = 20.7 (6 predictors entered)

Predictor Crude OR (95% CI) p Adjusted OR (95% CI) p
Patient Characteristics
Age (per 10 years) 1.41 (1.221.63) <0.001 1.28 (1.091.49) 0.002
APACHE II (per 5 points) 1.87 (1.612.17) <0.001 1.74 (1.482.04) <0.001
Organ Support & Diagnosis
Mechanical ventilation (yes vs no) 3.42 (2.115.54) <0.001 2.81 (1.704.65) <0.001
Vasopressor use (yes vs no) 2.94 (1.874.62) <0.001 2.24 (1.383.64) 0.001
Septic shock (yes vs no) 2.11 (1.433.12) <0.001 1.67 (1.092.56) 0.018
Creatinine > 2.0 mg/dL (yes vs no) 1.82 (1.192.79) 0.006 1.41 (0.892.23) 0.143
Model fit: Hosmer-Lemeshow 2(8) = 6.84, p = 0.55 (good fit) - Nagelkerke R2 = 0.38 - AUC = 0.841 (95% CI 0.8040.878)
Key interpretations: APACHE II score (aOR 1.74 per 5-point increase), mechanical ventilation (aOR 2.81), vasopressor use (aOR 2.24), septic shock (aOR 1.67), and age (aOR 1.28 per decade) were independent predictors of 30-day mortality. Elevated creatinine was significant in univariate analysis (crude OR 1.82, p = 0.006) but lost significance after adjustment (aOR 1.41, p = 0.143) likely confounded by the stronger association with APACHE II score and vasopressor requirement, both of which reflect renal dysfunction indirectly. The AUC of 0.841 indicates excellent model discrimination.
2

Risk Factors for Type 2 Diabetes in a Community Health Survey

Cross-sectional study - N = 1,240 adults - Events (T2DM): 186 (15.0%) - EPV = 186/5 = 37.2 (5 predictors)

Predictor Crude OR (95% CI) p Adjusted OR (95% CI) p
BMI 30 kg/m2 (obese vs normal) 3.81 (2.725.33) <0.001 3.12 (2.184.47) <0.001
Family history of T2DM (yes vs no) 2.94 (2.104.11) <0.001 2.71 (1.923.83) <0.001
Hypertension (yes vs no) 2.42 (1.743.36) <0.001 1.88 (1.322.68) <0.001
Physical inactivity (yes vs no) 1.96 (1.412.72) <0.001 1.62 (1.142.31) 0.007
Age (per 10 years) 1.58 (1.381.81) <0.001 1.44 (1.241.67) <0.001
Hosmer-Lemeshow 2(8) = 9.21, p = 0.32 - Nagelkerke R2 = 0.31 - AUC = 0.808 (95% CI 0.7780.838)
Key interpretations: All five predictors remained independently significant after multivariable adjustment. The strongest independent risk factor was obesity (aOR 3.12) patients with BMI 30 had 3.12 times the odds of T2DM compared to normal-weight individuals after controlling for family history, hypertension, inactivity, and age. Note that hypertension's crude OR (2.42) dropped to 1.88 after adjustment this attenuation is explained by the strong correlation between hypertension and both obesity and age. All four adjusted ORs exceed their crude counterparts because positive confounding in the reverse direction was less common in this dataset.
3

Predictors of Surgical Site Infection (SSI) After Elective Colorectal Surgery

Prospective cohort - N = 614 patients - Events (SSI): 88 (14.3%) - EPV = 88/5 = 17.6 (5 predictors)

Predictor Crude OR (95% CI) p Adjusted OR (95% CI) p
Type 2 diabetes (yes vs no) 2.74 (1.724.36) <0.001 2.41 (1.483.93) <0.001
Operation duration > 180 min (yes vs no) 2.18 (1.383.44) 0.001 2.03 (1.273.25) 0.003
Antibiotic given > 60 min pre-incision (yes vs no) 1.88 (1.182.99) 0.008 1.71 (1.062.76) 0.028
BMI 35 kg/m2 (yes vs no) 1.62 (1.012.60) 0.047 1.47 (0.902.41) 0.124
Open vs laparoscopic approach 1.54 (0.982.44) 0.062 1.42 (0.882.28) 0.148
Hosmer-Lemeshow 2(8) = 7.53, p = 0.48 - Nagelkerke R2 = 0.21 - AUC = 0.741 (95% CI 0.6920.790)
Key interpretations: Three independent predictors of SSI were identified: T2DM (aOR 2.41), prolonged operation > 180 minutes (aOR 2.03), and delayed antibiotic prophylaxis (aOR 1.71). BMI 35, which was marginally significant in univariate analysis (crude OR 1.62, p = 0.047), became non-significant after adjustment (aOR 1.47, p = 0.124) partially explained by its correlation with diabetes. The delayed antibiotic finding has direct quality-improvement implications: ensuring prophylactic antibiotics are administered within 60 minutes before incision is a modifiable risk factor for SSI prevention. The AUC of 0.741 indicates acceptable discrimination the model correctly ranks a randomly selected SSI patient above a non-SSI patient 74.1% of the time.

Reporting Logistic Regression in a Medical Journal Checklist

Most major medical journals follow STROBE (observational studies) or CONSORT (trials) guidelines, both of which specify what must be reported for regression analyses. Use this checklist before submission:

Sample size and event count: State total N and number of outcome events. Example: "Among 487 patients, 124 (25.5%) died within 30 days."
EPV justification: State how many predictors you entered and that EPV 10. Example: "Six predictor variables were entered, yielding an EPV of 20.7."
Both crude AND adjusted ORs: Present a table with crude (univariate) odds ratios and adjusted (multivariate) odds ratios for all predictors, not just significant ones.
95% confidence intervals: Every OR must be accompanied by its 95% CI. Never report only the OR or only the p-value.
Model fit Hosmer-Lemeshow test: Report 2 value, degrees of freedom, and p-value. Example: "The Hosmer-Lemeshow test indicated good model fit (2(8) = 6.84, p = 0.55)."
Nagelkerke R2: Report as a measure of overall model explanation. Example: "The model explained 38% of variance in outcome (Nagelkerke R2 = 0.38)."
AUC-ROC with 95% CI: Report overall model discrimination. Example: "The model demonstrated good discrimination (AUC = 0.841, 95% CI 0.8040.878)."
Variable selection rationale: State in the Methods that variables were selected a priori based on clinical plausibility and existing literature, not stepwise selection.
Missing data: Report the proportion of missing data for each predictor and the method used (complete case, multiple imputation). Missing data above 510% requires formal imputation.
Software and version: Specify statistical software. Example: "All analyses were conducted using SPSS version 26 (IBM Corp.) / R version 4.3.2 with the glm() function."

Common Mistakes in Logistic Regression And How to Fix Them

Mistake 1: Using linear regression for a binary outcome

Applying ordinary least squares linear regression to a 0/1 outcome produces predicted values outside the 01 range, non-normal and heteroscedastic residuals, and invalid standard errors. This was common in older medical literature but is now considered a serious methodological error by reviewers.

Fix: Always use logistic regression for binary outcomes. If you want to estimate a risk ratio (not odds ratio) for a common outcome, use Poisson regression with robust variance ("modified Poisson"), not linear probability models.

Mistake 2: Violating the EPV rule too many predictors for too few events

Including 12 predictor variables in a logistic regression with only 35 outcome events (EPV = 2.9) is the single most common statistical error in submitted medical manuscripts. The model will appear to run without error, the software will produce output, but all the estimates are unreliable inflated ORs, spuriously significant p-values, and results that will not replicate.

Fix: Apply the EPV 10 rule before building any model. If underpowered, either collect more data, reduce the predictor list to the clinically most important variables, or use Firth's penalized logistic regression which is specifically designed for small samples and rare events.

Mistake 3: Using stepwise selection and calling it "multivariate logistic regression"

Backward elimination or forward selection methods find the model that fits the sample best not the model that is clinically correct. Variables dropped by stepwise selection may be important confounders. The resulting model overfits to the sample, and the p-values are optimistic because the same data were used to both select and evaluate variables. Despite being flagged repeatedly in the methodological literature, this remains widespread in medical journals.

Fix: Pre-specify all predictor variables in your statistical analysis plan before data collection, or at minimum before looking at the data. If you must use data-driven selection (exploratory studies only), use LASSO with cross-validation, which has better statistical properties than stepwise, and label results clearly as exploratory.

Mistake 4: Reporting only adjusted ORs, omitting the crude ORs

Showing only the multivariate-adjusted ORs without the crude (univariate) ORs makes it impossible for readers to identify confounding the primary scientific justification for running multivariate analysis. Journals increasingly require both; reviewers will ask for them if missing.

Fix: Always present crude and adjusted ORs side by side in the same table, with 95% CIs and p-values for both. Variables that change substantially between crude and adjusted (defined as >1015% change in the OR) confirm confounding and strengthen the scientific justification for your multivariate approach.

Mistake 5: Treating a continuous predictor as categorical without clinical justification

Arbitrarily categorizing a continuous predictor (e.g., age into tertiles, BMI into quartiles, WBC into "high vs normal") to enter it into logistic regression wastes statistical power, introduces arbitrary cut-points, and can mask non-linear relationships. The practice of categorizing at the median is particularly problematic the median cut-point from the sample is not clinically meaningful and will not replicate in other samples.

Fix: Enter continuous predictors as continuous variables. If you suspect a non-linear relationship (Box-Tidwell test or clinical knowledge), use clinically validated cut-points (established reference ranges, published thresholds) or model the non-linearity using restricted cubic splines. Never categorize at the sample median unless it corresponds to an established clinical threshold.

Frequently Asked Questions

When should I use logistic regression instead of a chi-square test or t-test?+
Use logistic regression when you need to simultaneously examine a binary outcome against multiple predictor variables, particularly when you need to control for confounding.

A chi-square test tests the association between a single categorical predictor and a binary outcome one predictor at a time, no adjustment for other variables. It produces a crude odds ratio (from the 2-2 table) but cannot give you an adjusted OR.

A t-test compares the mean of a continuous predictor between outcome groups again, one variable at a time with no confounding adjustment.

Logistic regression replaces these single-variable tests when you have: multiple predictors you want to include simultaneously; confounders you need to adjust for; or a need to quantify the independent effect of each predictor. The chi-square test and t-test remain appropriate for describing univariate associations in Table 1 of your paper (patient characteristics by outcome group) but the adjusted OR from logistic regression is what determines independent risk factors.
What is the difference between logistic regression and linear regression?+
Linear regression models a continuous, normally distributed outcome directly: the output is a 2 coefficient (the change in the outcome per unit change in the predictor). It assumes residuals are normally distributed and homoscedastic.

Logistic regression models the probability of a binary (0/1) outcome using the logistic function, which constrains predictions to 01. The output is an odds ratio (OR = e^2). It does not require normally distributed predictors or residuals.

The critical practical difference: using linear regression for a binary outcome is methodologically wrong it can produce predicted probabilities below 0 or above 1, and produces biased standard errors. If your outcome is "yes/no," use logistic regression. If your outcome is a continuous measurement, use linear regression.
How do I interpret an odds ratio less than 1?+
An OR below 1.0 means the predictor is associated with lower odds of the outcome a protective or inverse association.

The percentage reduction in odds = (1 OR) - 100%:
OR = 0.80 20% lower odds
OR = 0.50 50% lower odds
OR = 0.25 75% lower odds

Example: aOR = 0.42 (95% CI 0.280.63) for antibiotic prophylaxis means that patients who received timely antibiotics had 58% lower odds of SSI compared to patients who did not (1 0.42 = 0.58), after adjusting for all other variables.

If the 95% CI includes 1.0 (e.g., aOR 0.78, 95% CI 0.511.20), the result is not statistically significant you cannot rule out a null effect. Report it as "not significantly associated" rather than "protective."
Can I use logistic regression with a small sample?+
Logistic regression requires adequate events per variable (EPV) at least 10 outcome events per predictor entered into the model (some authorities recommend 20). Events means the number of patients who experienced the outcome, not the total sample size.

For studies with very small samples or rare events, standard maximum likelihood logistic regression produces inflated ORs, overfit models, and confidence intervals that are too narrow. Alternatives:

Firth's penalized logistic regression specifically designed for small samples and rare events. Adds a small bias correction to the likelihood to prevent coefficient inflation. Available in R (logistf package), Stata (firthlogit).

LASSO logistic regression penalizes large coefficients, automatically reducing overfitting. Requires cross-validation to select the penalty parameter.

Always state EPV explicitly in your methods section, whether it meets the guideline or not.
What is Nagelkerke R-squared and how should I interpret it?+
Nagelkerke R2 is a pseudo-R2 statistic that approximates how much variation in the binary outcome the logistic regression model explains, analogous to R2 in linear regression but NOT identical to it.

It ranges from 0 (model explains nothing beyond the null) to 1 (perfect prediction). In clinical logistic regression, values in the range 0.200.40 typically indicate a reasonable to good model. You should not expect values of 0.700.80 as you might in linear regression binary outcomes have inherent unexplained variability that keeps pseudo-R2 values lower.

Nagelkerke R2 is not the primary model quality indicator. Always pair it with the Hosmer-Lemeshow goodness-of-fit test (is the model calibrated?) and AUC (does the model discriminate?). A model can have a modest Nagelkerke R2 but still have excellent clinical discrimination if AUC is high.
Do I need to test for normality before running logistic regression?+
No. This is one of the most common misconceptions in clinical research. Normality testing (Shapiro-Wilk, Kolmogorov-Smirnov) is relevant to linear regression and parametric tests that assume normally distributed residuals not to logistic regression.

Logistic regression has no normality assumption not for predictors and not for residuals. The five assumptions you should check are: binary outcome, independence of observations, EPV adequacy, absence of multicollinearity, and linearity of continuous predictors with the log-odds (Box-Tidwell test).

Checking normality before logistic regression is wasted effort and sometimes leads to incorrect decisions (e.g., unnecessarily categorizing a skewed continuous predictor before entering it into the model, which loses statistical power).
What is the difference between binary, multinomial, and ordinal logistic regression?+
Binary logistic regression: Outcome has exactly 2 categories (most common in clinical research). Output: adjusted OR. Example: 30-day mortality (died vs survived).

Multinomial logistic regression: Outcome has 3 or more unordered categories. Each category is compared to a chosen reference category. Output: relative risk ratio for each category vs reference. Example: treatment response classified as complete response, partial response, or no response.

Ordinal logistic regression: Outcome has 3 or more ordered categories with a meaningful rank but unequal intervals. Uses the proportional odds model, which assumes the OR is constant across all possible cut-points of the outcome (this "proportional odds assumption" must be tested using the Brant test or score test). Output: proportional OR. Example: ECOG PS 04, pain severity (mild/moderate/severe), Gleason grade group 15.

Do not collapse an ordinal outcome into binary (e.g., "mild vs moderate-severe") unless you have a strong clinical reason you lose statistical power and clinically meaningful information.
How many variables can I include in a logistic regression model?+
The limit is set by the events per variable (EPV) rule:

Maximum predictors = Number of outcome events - 10

Count only the outcome events not total sample size. If 80 patients experienced the outcome, include at most 8 predictor variables (traditional rule) or 4 variables (conservative rule preferred for high-impact publication).

Note: each level of a categorical variable with k categories counts as k1 predictors. A variable with 4 categories counts as 3 predictors in your EPV calculation.

Exceeding the EPV constraint causes overfitting: the model memorizes the current sample instead of detecting real patterns it will produce spuriously precise ORs that will not replicate in a validation cohort. If you need more predictors than EPV allows: expand sample size, narrow the predictor list based on clinical priority, or use penalized regression (Firth's method or LASSO).

Run Logistic Regression Free Online

StatClinic's logistic regression tool produces crude ORs, adjusted ORs, 95% CIs, Hosmer-Lemeshow test, Nagelkerke R2, AUC, and a publication-ready results table no download, no login, no cost.

Open Logistic Regression Tool