Launch StatClinic →
Regression Analysis

How to Choose Covariates in Regression Analysis: A Medical Research Guide

📖 24 min read 🗓 July 2026 ✓ Updated July 2026
S
StatClinic Editorial Team Statistical content for medical researchers and clinicians
"Why did you adjust for these five variables and not the other ten you measured?" is one of the hardest questions a regression model has to answer, and picking covariates by throwing in "everything available" or "everything significant" almost never survives that question intact. This guide walks through how covariates are actually chosen in medical research: the vocabulary (confounder, mediator, effect modifier), the tools (clinical knowledge, literature, DAGs), the methods (purposeful vs stepwise selection), the failure modes (overadjustment, multicollinearity), and worked logistic and linear regression examples — everything you need to defend your adjustment set with a straight answer.

What Is a Covariate?

A covariate is any variable included in a regression model alongside your main variable of interest (the exposure, treatment, or predictor you actually care about). If you are studying whether a new drug lowers blood pressure, the drug/placebo assignment is your exposure; age, baseline blood pressure, and kidney function might all be covariates included to adjust for their independent influence on the outcome.

"Covariate" is a role, not a fixed statistical category — the same variable can be a covariate in one model and the primary exposure in another. What matters is why it is in the model: to control for its effect on the outcome so the effect of your exposure of interest can be estimated more accurately, isolated from that influence.

Covariates serve a few distinct purposes, and it helps to be explicit about which one applies to each variable in your model. Some are included to remove confounding (the most common and most important reason, covered in depth below). Others are included purely to improve statistical precision — a variable strongly associated with the outcome but unrelated to the exposure can tighten your confidence interval without changing the point estimate much, simply by explaining some of the outcome's variability that would otherwise show up as noise. Still others are included because a journal, thesis committee, or regulatory guideline expects a specific baseline adjustment set for your type of study, regardless of whether every individual variable in that set is a textbook confounder in your particular dataset. Knowing which of these three reasons applies to each covariate you include makes your model far easier to defend when someone asks why it's there.

Take-Home Points A covariate is defined by its role (adjustment, not the main question) not by any fixed property of the variable itself. Every regression model has exactly one primary exposure of interest but can have many covariates.

Predictor vs Covariate vs Confounder vs Mediator vs Effect Modifier

These five terms get used almost interchangeably in casual conversation and mean genuinely different things — mixing them up is one of the fastest ways to build the wrong model.

TermDefinitionClinical Example
Predictor / ExposureThe variable whose effect on the outcome you actually want to estimateNew drug vs placebo, predicting blood pressure change
CovariateAny variable adjusted for alongside the predictor, for any reasonAge, baseline BP, kidney function, included alongside drug assignment
ConfounderAssociated with both exposure and outcome; not on the causal pathway; distorts the estimate if omittedSmoking, associated with both coffee intake and lung cancer
MediatorOn the causal pathway between exposure and outcome; explains how the exposure worksWeight loss, explaining how an exercise program lowers blood pressure
Effect ModifierChanges the size or direction of the exposure's effect across its own categoriesSex, if a drug works better in women than men
Practical Example — Telling Them Apart

Research question: Does a new exercise program (exposure) reduce systolic blood pressure (outcome)?
Confounder: Baseline fitness level — likely influences both whether someone joins the program and their blood pressure independently.
Mediator: Weight loss during the program — this is part of how exercise lowers blood pressure, sitting on the causal pathway between exposure and outcome.
Effect modifier: Age — if the program lowers blood pressure more in older participants than younger ones, age modifies (changes the size of) the exposure's effect.

Confounder vs Mediator: The Adjustment Decision Is Opposite Adjust for confounders — leaving them unadjusted biases your estimate. Do NOT adjust for mediators in your primary model — adjusting for them removes part of the true effect you are trying to measure, since some of that effect operates through the mediator. Confusing the two is one of the most consequential covariate selection errors in medical research.
Take-Home Points Confounders get adjusted for; mediators generally do not, at least not in the primary effect model; effect modifiers get examined via interaction terms or stratified analysis, not simple adjustment. Getting this vocabulary right is the foundation everything else in this guide builds on.

Using Clinical Knowledge to Select Covariates

Before any statistical method is applied, clinical and biological reasoning should identify the first candidate list of covariates — variables a clinician, based on pathophysiology and clinical experience, would expect to influence the outcome or the likelihood of receiving the exposure. This step happens on paper, ideally before looking at your dataset at all, and should be documented in your Statistical Analysis Plan alongside your other pre-specified analytic decisions.

This is also where a co-investigator or supervisor with deep clinical experience in your specific disease area earns their place on the author list beyond data collection — a statistician working from the dataset alone cannot know that a particular lab value is only ordered in sicker patients, or that a specific comorbidity code is inconsistently recorded across the study period, both of which change how a variable should be treated. Involve clinical expertise at this stage, not only at the point of interpreting the finished results.

Practical Example

Study: Does a new anticoagulant (exposure) reduce stroke risk (outcome) in atrial fibrillation patients?
Clinically obvious candidate covariates: age (stroke risk rises sharply with age), prior stroke or TIA (strongest single predictor of future stroke), hypertension, diabetes, and heart failure (all established components of the CHA₂DS₂-VASc stroke risk score used in this exact clinical context) — a clinician would flag all five before any data are examined, simply from knowing how stroke risk is clinically assessed.

Take-Home Points Start covariate selection with clinical reasoning, on paper, before touching the dataset. Established clinical risk scores for your outcome (like CHA₂DS₂-VASc above) are often a ready-made starting covariate list.

Using the Literature to Select Covariates

The second source of candidate covariates is prior published research on the same or a closely related outcome — if previous studies consistently adjusted for a particular variable, or found it to be an independent predictor, that is strong evidence it belongs in your model too, and omitting it invites a reviewer to ask why your model differs from established practice in the field.

A quick, practical literature check: pull the three to five most-cited or most recent studies on your exact outcome, and list every variable their regression models adjusted for. Variables that appear across most or all of these studies form a strong, defensible core adjustment set — and any variable you deliberately choose to exclude despite its consistent presence in the literature should have a stated reason (not simply an oversight) in your methods.

Systematic reviews and clinical prediction model papers on your outcome are especially efficient sources here, since they often already synthesize which predictors have been consistently associated with the outcome across many individual studies, saving you from re-deriving that list study by study. Be alert, though, to the difference between a variable that appeared in prior models because it is a genuine confounder for the exposure-outcome relationship you are studying, versus one that was simply a strong predictor in a purely predictive model with a different research question — the two goals (causal adjustment vs prediction) do not always call for the same variable set, even when they draw on the same outcome literature.

Take-Home Points Check what similar published studies adjusted for — consistency with the literature strengthens your model's credibility and pre-empts an obvious reviewer question. Deviating from the established adjustment set requires a stated justification, not silence.

Directed Acyclic Graphs (DAGs): A Brief Introduction

A Directed Acyclic Graph (DAG) is a simple diagram: circles represent variables, and one-directional arrows represent an assumed causal relationship between them ("acyclic" means the arrows never loop back on themselves). Drawing one forces you to make your causal assumptions about a research question explicit and visible, rather than leaving them implicit in your head — and once drawn, the DAG tells you exactly which variables belong in your adjustment set to isolate your exposure's true effect.

Baseline Fitness
·
Exercise Program (Exposure)
Blood Pressure (Outcome)
Baseline fitness has arrows into both the exposure and the outcome — this is exactly the DAG signature of a confounder, and is why it must be adjusted for to isolate the true exposure→outcome arrow.

You do not need special training or software to draw a useful DAG for a typical clinical study — pen and paper is enough. Free dedicated tools such as DAGitty can also take your drawn structure and automatically calculate the minimal correct adjustment set, which is especially useful once a DAG has more than four or five variables and the correct set is no longer obvious by eye.

The real value of drawing a DAG is not the diagram itself but the disagreement it surfaces: when two co-investigators draw the arrows differently for the same study (one assumes a variable is a confounder, the other assumes it is a mediator), that disagreement is a genuine, important scientific question about the underlying biology or care pathway — one worth resolving explicitly, with reference to prior literature, before analysis begins, rather than leaving each investigator to run a different, undisclosed model privately in their head.

Take-Home Points A DAG makes implicit causal assumptions explicit and visible — draw one even informally before finalizing your adjustment set. A variable with arrows into both the exposure and the outcome is the visual signature of a confounder that must be adjusted for.

The Covariate Decision Flowchart

Once you have a candidate variable from clinical knowledge, the literature, or your DAG, run it through this sequence to decide whether — and how — to include it.

1. Is the variable associated with the OUTCOME?
NO → Not a covariate. Do not include it.
YES → Continue to Question 2.
2. Is it also associated with the EXPOSURE, independent of the outcome?
NO → It's a "precision variable." Adjusting is optional (may tighten your CI) but not required.
YES → Continue to Question 3.
3. Does the EXPOSURE cause changes in this variable, which then affects the OUTCOME? (Is it on the causal pathway?)
NO → Continue to Question 4.
YES → It's a MEDIATOR. Do NOT adjust for it in the primary effect model.
4. Is the variable itself caused by BOTH the exposure and the outcome (or their common downstream effects)?
NO → Continue below.
YES → It's a COLLIDER. NEVER adjust for it — doing so introduces bias.
✅ It's a genuine CONFOUNDER — include it in your adjustment set.
Take-Home Points Run every candidate covariate through this four-question sequence rather than deciding by instinct or by statistical significance alone. Mediators and colliders are the two variable types most often adjusted for by mistake — this flowchart exists specifically to catch both.

Purposeful Selection

Purposeful selection builds the covariate set through a structured, semi-manual process that blends statistical screening with clinical judgment, rather than letting either one decide alone. It generally proceeds in stages: first, screen each candidate variable in a univariate model against the outcome, retaining any that reach a relatively generous threshold (commonly p < 0.20, deliberately looser than the usual 0.05, since a stricter cutoff at this stage risks dropping true confounders); then build a multivariable model with all retained candidates; then remove variables one at a time if doing so does not meaningfully change the coefficient of the primary exposure (a common threshold is a change of less than 10–20% in that coefficient); and finally, force back in any variable considered a confounder on clinical or DAG-based grounds regardless of what the statistical screening suggested.

1

Univariate screening

Test each candidate covariate against the outcome alone; retain any with p < 0.20 (a deliberately loose threshold) plus any known confounder regardless of its p-value.

2

Build the full multivariable model

Include every variable retained in Step 1 alongside the primary exposure.

3

Remove variables that don't change the exposure's coefficient

Drop one variable at a time if its removal changes the primary exposure's coefficient by less than roughly 10–20%.

4

Force back in known confounders

Any variable identified as a true confounder via clinical knowledge or a DAG stays in the model even if statistically "unnecessary."

Take-Home Points Purposeful selection is slower than automated stepwise methods but produces a defensible, clinically grounded model — it is the preferred approach whenever the goal is estimating the adjusted effect of a specific exposure, which describes most medical research questions.

Stepwise Selection

Stepwise selection (forward, backward, or bidirectional) is a fully automated procedure that adds or removes variables from a model based purely on a statistical significance threshold, with no clinical input into which variables are considered. It is fast and easy to run, which is exactly why it remains common — and exactly why it is also widely criticized in the methodological literature.

IssueWhy It Matters
Ignores causal structureCan select mediators or colliders purely because they are statistically associated with the outcome, biasing the exposure estimate
Unstable variable selectionA different random sample from the same population can produce a substantially different final variable set
Inflated significanceP-values from a stepwise-selected model do not account for the model-selection process itself, overstating certainty
Can drop known confoundersA true confounder that fails to reach significance by chance in this specific sample gets dropped, reintroducing bias

Stepwise selection is best reserved for purely exploratory or predictive modeling — forecasting an outcome, without needing to interpret any single coefficient causally — rather than for estimating the adjusted effect of a specific exposure, which is the far more common goal in clinical research and exactly where purposeful selection or DAG-based selection is the stronger method.

A useful way to tell which situation you are in: ask whether your research question has a named "exposure of interest" whose coefficient you plan to interpret and report (a treatment, a risk factor, a diagnostic test) — if yes, this is an adjustment problem, and stepwise selection is the wrong tool regardless of how well it performs statistically. If instead your goal is purely to build the best-predicting equation for an outcome, with no single variable singled out for causal interpretation (a diagnostic risk score, for instance), prediction-oriented methods including stepwise selection, or better, penalized regression such as LASSO, become reasonable options.

Take-Home Points Use stepwise selection, if at all, only for pure outcome prediction — never to estimate the causal or adjusted effect of a specific exposure. Reviewers increasingly flag stepwise-selected covariate sets in etiological or treatment-effect studies as a methodological weakness.

Variables That Should Almost Always Be Adjusted For

While every study is different, a small set of variable types are so commonly confounders across medical research that they deserve automatic consideration in nearly any adjustment set, pending confirmation they fit your specific DAG.

Take-Home Points Age, sex, baseline outcome value, comorbidity burden, and study site are reasonable default candidates in almost any medical regression model — but "almost always" is not "always automatically"; confirm each still fits your specific DAG rather than including it purely by habit.

Variables That Should Never Be Adjusted For

Just as some variables belong in nearly every model, a few categories should be excluded from the primary adjustment set essentially always, because adjusting for them actively introduces or worsens bias rather than controlling for it.

Take-Home Points Mediators, colliders, and instrumental variables should generally stay out of the primary adjustment set — each represents a different mechanism by which "controlling for more" actively makes the estimate worse, not better.

Overadjustment Bias

Overadjustment bias occurs when a model adjusts for too many variables, or the wrong variables (typically mediators or colliders), producing a distorted — usually attenuated toward the null — estimate of the exposure's true effect. It is the statistical equivalent of "controlling away" the very relationship you are trying to measure, and is a direct consequence of not distinguishing confounders from mediators and colliders during selection.

Overadjustment is particularly easy to fall into with electronic health record and registry-based studies, where dozens or hundreds of variables are readily available in the dataset and the temptation is to adjust for as many as possible on the assumption that more variables signal more rigor to a reviewer. The opposite is usually true: a reviewer with methodological training is more likely to ask why a specific post-exposure variable was included than to be reassured by a long adjustment list, especially if that list includes variables measured after the exposure occurred.

Practical Example

Study: Does bariatric surgery (exposure) reduce the risk of new-onset type 2 diabetes (outcome)?
Overadjustment error: Adjusting for post-surgery BMI (measured after the surgery) — but weight loss is precisely how bariatric surgery reduces diabetes risk. Adjusting for it is adjusting for a mediator, and will make the surgery's true protective effect appear artificially small or even non-significant.
Correct approach: Adjust for pre-surgery (baseline) BMI as a genuine confounder; do not adjust for post-surgery BMI in the primary model — it can instead be examined separately in a dedicated mediation analysis if that specific mechanism question is of interest.

Take-Home Points Overadjustment is not a "safe, conservative" choice — it actively biases the estimate, usually toward hiding a real effect. More covariates is not automatically more rigorous; the covariate selection logic above exists precisely to prevent this mistake.

Multicollinearity Among Covariates

Multicollinearity occurs when two or more covariates in the same model are strongly correlated with each other, which makes it statistically difficult for the model to separate their individual, independent contributions to the outcome — coefficients become unstable, standard errors inflate, and a genuinely important variable can appear falsely non-significant simply because it shares variance with a correlated covariate in the same equation.

Practical Example

A model predicting cardiovascular risk includes both waist circumference and BMI as separate covariates. These two measures are typically correlated above r = 0.85 in most populations. Including both inflates the variance inflation factor (VIF) for each, often above 8–10, and can make neither appear as a significant independent predictor even though body composition genuinely matters — the fix is to include only one (chosen on clinical or measurement-quality grounds), not both.

Check the Variance Inflation Factor (VIF) for every covariate before interpreting a multivariable model — a VIF above 5 to 10 is generally treated as concerning and warrants removing one of the correlated pair, combining them into a composite, or using a penalized regression method more robust to correlated predictors. This exact scenario is one of the most common statistical reviewer comments raised on multivariable regression models; see our guide to common reviewer comments about statistics for the full response-letter example.

Take-Home Points Check VIF for every covariate in a multi-predictor model before trusting any individual coefficient. Two highly correlated covariates measuring essentially the same underlying construct (like BMI and waist circumference) should rarely both be included.

Sample Size Considerations: Events Per Variable

The number of covariates a model can support depends directly on sample size — cramming too many covariates into too few observations produces an overfit model with unstable, unreliable coefficients, regardless of how carefully those covariates were chosen. The widely cited rule of thumb is at least 10 events per variable (EPV) for logistic regression or survival analysis, and roughly 10–15 observations per variable for linear regression.

Practical Example

A study has 340 patients, of whom 42 experienced the outcome of interest (a relatively rare event). The limiting number is 42 (the smaller of the two outcome groups), not 340. At 10 events per variable, the working ceiling is 42 ÷ 10 ≈ 4 covariates — including the primary exposure. A model attempting to adjust for 12 covariates in this dataset is very likely overfit, regardless of how well each variable was individually justified on clinical grounds.

Use the sample size calculator at the design stage to confirm your planned model will support your intended adjustment set, and count every dummy variable from a multi-category covariate (a 4-category variable uses 3 degrees of freedom, not 1) toward your total.

When the justified covariate list genuinely exceeds what the sample size can support, resist the temptation to simply run the oversized model anyway and hope for the best — the honest options are to combine closely related variables into a single composite (a comorbidity index instead of five separate diagnosis flags), restrict adjustment to the two or three most clinically important confounders and disclose the remainder as an acknowledged limitation, or, if feasible, extend recruitment to reach an adequate sample size before finalizing the analysis.

Take-Home Points Count your limiting number — the smaller outcome group in logistic regression, or total N in linear regression — divide by 10, and treat that as your covariate ceiling. This constraint sometimes forces hard prioritization choices among an otherwise well-justified candidate list.

Worked Example: Logistic Regression

Research question: Is diabetes (exposure) independently associated with 30-day hospital readmission (binary outcome) after heart failure admission?

1

Candidate covariates from clinical knowledge + literature

Age, sex, ejection fraction, prior heart failure admissions, chronic kidney disease, length of index admission — all established readmission risk factors in the heart failure literature.

2

DAG check

Prior heart failure admissions and chronic kidney disease both plausibly influence readmission risk independent of diabetes status, and are not on the causal pathway between diabetes and readmission — genuine confounders, not mediators.

3

Sample size check

240 patients, 38 readmissions (the limiting number). At 10 EPV, ceiling ≈ 3–4 covariates. Purposeful selection narrows the 6 candidates to the 3 most influential: age, prior admissions, and chronic kidney disease.

Result & Reporting

"After adjusting for age, prior heart failure admissions, and chronic kidney disease, diabetes was independently associated with increased odds of 30-day readmission (adjusted OR 1.87, 95% CI [1.12, 3.13], p = 0.017)." See our odds ratio guide and the logistic regression calculator to run this analysis directly.

Worked Example: Linear Regression

Research question: Is a new dietary intervention (exposure) associated with change in LDL cholesterol (continuous outcome) over 6 months?

1

Candidate covariates

Baseline LDL, age, sex, baseline BMI, statin use at enrollment — all plausible independent predictors of LDL change, identified from clinical reasoning and prior dietary intervention trials.

2

Mediator check

Weight change during the study is deliberately excluded from the primary model — it is plausibly part of how the diet changes LDL (a mediator), not an independent confounder, so adjusting for it would understate the diet's true total effect.

3

Multicollinearity check

Baseline BMI and baseline LDL show only weak correlation (r = 0.18) in this sample — both can safely remain in the model without a multicollinearity concern.

Result & Reporting

"After adjusting for baseline LDL, age, sex, baseline BMI, and statin use, the dietary intervention was associated with a significantly greater reduction in LDL cholesterol compared to standard advice (B = -18.4 mg/dL, 95% CI [-27.1, -9.7], β = -0.31, p < 0.001)." See our reporting-by-test guide for the full linear regression reporting template, and the linear regression calculator or multiple regression calculator to run this analysis directly.

Common Covariate Selection Mistakes

Mistake 1: "Adjusting for Everything Available"

Including every measured variable regardless of its role — mediators, colliders, and irrelevant variables alike — treats "more adjustment" as automatically safer, when it frequently introduces overadjustment bias and burns through the sample size budget on variables that shouldn't be there.

✓ Fix: Run every candidate through the decision flowchart above before including it, rather than defaulting to inclusion.

Mistake 2: Selecting Covariates by Univariate Significance Alone

Including only variables that reach p < 0.05 against the outcome on their own drops true confounders that happen not to reach significance by chance in this specific sample, reintroducing the bias adjustment was meant to remove.

✓ Fix: Use a looser screening threshold (e.g., p < 0.20) as in purposeful selection, and force in known confounders regardless of their own p-value.

Mistake 3: Adjusting for a Mediator

Including a variable that lies on the causal pathway between exposure and outcome removes part of the true effect from the estimate — the single most consequential covariate selection error, and often invisible unless the causal structure is explicitly considered.

✓ Fix: Explicitly ask Question 3 of the flowchart above for every candidate before including it.

Mistake 4: Adjusting for a Post-Randomization Variable in a Trial

In a randomized trial, adjusting for a variable measured after randomization (which could have been affected by the treatment itself) reintroduces exactly the kind of confounding randomization was designed to prevent.

✓ Fix: In RCTs, restrict adjustment to baseline (pre-randomization) covariates only, unless a specific post-randomization variable is being deliberately analyzed as a mediator in a separate, clearly labeled analysis.

Mistake 5: Ignoring Sample Size Constraints on Model Size

Building a well-justified 12-variable adjustment set for a study with 40 outcome events produces an overfit, unstable model, no matter how sound each individual variable's justification was.

✓ Fix: Calculate your events-per-variable ceiling before finalizing the covariate list, and prioritize ruthlessly if the justified list exceeds it.

Mistake 6: Not Pre-Specifying the Covariate Set

Deciding the final adjustment set after seeing which combination of covariates produces the most favorable p-value for the exposure is a form of undisclosed analytic flexibility, and is exactly what a Statistical Analysis Plan exists to prevent.

✓ Fix: Finalize the covariate selection method and candidate list before analyzing the primary outcome, and document it in your SAP.

Frequently Asked Questions

What is the difference between a covariate and a confounder? +
A covariate is any variable included in a regression model alongside the main exposure of interest — the term describes its role in the model, not any particular statistical property. A confounder is a specific type of covariate: a variable associated with both the exposure and the outcome, not on the causal pathway between them, that distorts the exposure-outcome relationship if left unadjusted. Every confounder should be treated as a covariate, but not every covariate is a confounder.
How many covariates can I include in my regression model? +
The widely cited rule of thumb is at least 10 events (for logistic regression or survival analysis) or 10-15 observations (for linear regression) per covariate, though this can be relaxed toward 5-9 per variable in some circumstances with appropriate shrinkage methods. Count your limiting number — the smaller of your two outcome groups in logistic regression, or your total sample size in linear regression — divide by 10, and treat that as your working ceiling, including any dummy variables from multi-category covariates.
Should I adjust for a variable even if it is not statistically significant? +
Yes, if it is a known or biologically plausible confounder. Confounder selection should be based on causal reasoning and prior literature, not on whether the variable reaches statistical significance in your specific dataset — a true confounder can fail to reach significance by chance while still distorting the exposure-outcome relationship if omitted. This is why purposeful selection outperforms significance-based stepwise selection for confounder control.
Is stepwise regression ever acceptable in medical research? +
Stepwise selection is best reserved for purely exploratory or predictive modeling where the goal is forecasting an outcome rather than estimating the causal or adjusted effect of a specific exposure, and even then should be interpreted cautiously given its tendency to produce unstable, non-reproducible variable sets. For estimating the adjusted effect of a specific exposure — the most common goal in clinical research — a pre-specified covariate set chosen through clinical knowledge, literature review, and causal reasoning is the methodologically preferred and increasingly expected approach.
What is a Directed Acyclic Graph (DAG) and do I need special software to draw one? +
A DAG is a diagram of circles (variables) connected by one-directional arrows (assumed causal relationships) that makes your causal assumptions explicit and tells you which variables to adjust for. No special software is required for a typical clinical study — pen and paper is sufficient; free tools such as DAGitty can automatically identify the correct minimal adjustment set once you have drawn your assumed causal structure.
What happens if I adjust for a mediator by mistake? +
Adjusting for a mediator will artificially shrink or completely eliminate the estimated effect of your exposure, because the model attributes part or all of the exposure's true effect to the mediator instead. This is one of the most common and most serious covariate selection errors in medical research: it systematically biases the exposure's coefficient toward showing a weaker effect than actually exists, and can make a genuinely important treatment effect appear falsely non-significant.

Build a Defensible Adjustment Set

Run your logistic or linear regression directly in StatClinic once your covariate set is finalized, and get a journal-ready, APA-formatted results sentence generated automatically. Free, no registration required.

Try StatClinic Free →