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.
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.
| Term | Definition | Clinical Example |
|---|---|---|
| Predictor / Exposure | The variable whose effect on the outcome you actually want to estimate | New drug vs placebo, predicting blood pressure change |
| Covariate | Any variable adjusted for alongside the predictor, for any reason | Age, baseline BP, kidney function, included alongside drug assignment |
| Confounder | Associated with both exposure and outcome; not on the causal pathway; distorts the estimate if omitted | Smoking, associated with both coffee intake and lung cancer |
| Mediator | On the causal pathway between exposure and outcome; explains how the exposure works | Weight loss, explaining how an exercise program lowers blood pressure |
| Effect Modifier | Changes the size or direction of the exposure's effect across its own categories | Sex, if a drug works better in women than men |
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.
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.
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.
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.
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.
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.
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.
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.
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.
Build the full multivariable model
Include every variable retained in Step 1 alongside the primary exposure.
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%.
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."
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.
| Issue | Why It Matters |
|---|---|
| Ignores causal structure | Can select mediators or colliders purely because they are statistically associated with the outcome, biasing the exposure estimate |
| Unstable variable selection | A different random sample from the same population can produce a substantially different final variable set |
| Inflated significance | P-values from a stepwise-selected model do not account for the model-selection process itself, overstating certainty |
| Can drop known confounders | A 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.
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.
- Age — associated with nearly every health outcome and frequently associated with exposure/treatment allocation too.
- Sex/biological sex — influences baseline risk for the large majority of clinical outcomes.
- Baseline value of the outcome — in any before-after or longitudinal design, baseline severity is almost always a confounder of the change score.
- Disease severity or comorbidity burden (e.g., Charlson Comorbidity Index) — influences both treatment decisions and prognosis in observational treatment comparisons.
- Study site or center, in multicenter studies — practice patterns and patient mix can differ meaningfully by site.
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.
- Mediators — variables on the causal pathway between exposure and outcome (see Question 3 of the flowchart above). Adjusting removes part of the true effect.
- Colliders — variables caused by both the exposure and the outcome (see Question 4 above). Adjusting introduces "collider bias," a spurious association that did not exist before adjustment.
- Instrumental variables — variables associated only with the exposure, not directly with the outcome (e.g., physician prescribing preference). Adjusting for these can amplify, rather than reduce, the bias from any unmeasured confounding that remains.
- Variables measured after the exposure but affected by it, when they are not clearly established as confounders — a post-exposure variable is always a candidate mediator or collider until proven otherwise, so it needs the same scrutiny either way.
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.
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.
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.
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.
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.
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.
Worked Example: Logistic Regression
Research question: Is diabetes (exposure) independently associated with 30-day hospital readmission (binary outcome) after heart failure admission?
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.
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.
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.
"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?
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.
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.
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.
"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.
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.
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.
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.
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.
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.
Frequently Asked Questions
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 →