Opens in a new tab

RESEARCH SUPPORT

Confounder Selection and DAGs
Adjustment Sets Chosen Before the Model

For observational studies in epidemiology: a causal diagram drawn from subject knowledge, an adjustment set read from it, mediators and colliders kept out of the model, and the assumptions stated so that a reviewer can question them.

No Commitment Required

Strictly Confidential

In-House PhD-Level Statisticians

Fixed Project Fee

Same-Day Response

What Is Confounder Selection With DAGs?

Confounder selection and DAGs together decide which variables enter a model that estimates an exposure effect from observational data. A directed acyclic graph states the researcher’s causal assumptions about the exposure, the outcome and the variables around them, and the adjustment set is read from the graph, not from significance tests. Directed acyclic graph analysis separates common causes, which are adjusted for, from mediators, which adjustment would remove from the effect, and colliders, which adjustment can turn into a source of bias. The confounding adjustment strategy is then reported with its assumptions. This is in-house work at OnlineSPSS, a specialist statistical consultancy for academic, clinical and professional research, done by PhD-level statisticians; the causal question is the researcher’s.

WHEN TO ENGAGE

When the Covariate List Comes Under Scrutiny

An adjustment set is easiest to defend when it is chosen before the outcome models are run, though reviewers also ask for it afterward.

Protocol Before Data An observational protocol or grant needs a stated causal question and a justified list of covariates, and the diagram can be drawn and agreed with coauthors before any file is opened.

Many Candidate Covariates A dataset holds dozens of variables and the model is undecided, so each is classed as a common cause, a mediator, a collider or none of these, using timing and subject knowledge.

Reviewer Questions the Covariates A reviewer asks why certain variables were adjusted for or left out, and the answer must rest on a causal argument, not on the fact that the variables were available.

Several Exposures in One Paper One paper reports effects of several exposures on a single outcome, and a shared model would adjust for the mediators of some of them, so each exposure needs its own set.

ARROWS, SETS AND CHECKS

Drawing, Reading and Checking a Diagram

A diagram is a set of assumptions, and the work follows its life: drawn from subject knowledge, read for adjustment sets, checked against the data and shown to reviewers.

Drawing the Diagram

Variables and arrows come from subject knowledge and the timing of measurement, unmeasured common causes are shown, and the reasoning behind each arrow is recorded in the field of Epidemiology.

Reading the Adjustment Set

Minimal and sufficient sets are identified using the back-door criterion, and several valid sets are compared when more than one exists.

Mediators and Colliders

Variables on the causal path, or caused by both exposure and outcome, stay out of a model for the total effect, since adjusting for them removes effect or opens a spurious path.

Scores and Instruments

A large set can be condensed with Propensity Score Matching (PSM), and Instrumental Variable Analysis is considered where confounding cannot be removed.

Testing Implied Independencies

A diagram implies conditional independencies that the data can partly check, and a conflict flags an arrow to revisit, though agreement does not prove the diagram right.

Unmeasured Confounding

Sensitivity analysis, such as an E-value, shows how strong an unmeasured common cause would need to be, within the wider scope of Clinical, Survival & Epidemiological.

ADJUSTMENT ERRORS

Adjustment Habits That Distort an Estimate

Most adjustment errors come from habits that look careful, such as adding every available variable or keeping those that reach significance.

Screening by P-Value Covariates are kept because they are significantly associated with the outcome, or dropped because they are not, though association in one dataset does not show that a variable is a confounder.

Adjusting for Everything Every available variable enters the model, including some caused by the exposure, so part of the effect is adjusted away and the estimate answers a different question.

Collider Opened by Design Adjusting for, or restricting to, a variable caused by both exposure and outcome, such as hospital admission, distorts the association and can create one that does not exist in the population.

Covariates Read as Effects Every coefficient in the adjusted model is interpreted as an effect, though the set was chosen for one exposure, so covariate estimates can mix direct and total effects.

Timing Ignored A covariate measured after the exposure is treated as a confounder because it correlates with both, when its place in time makes it a possible mediator.

Residual Confounding Dismissed A confounder measured coarsely, such as smoking recorded only as ever or never, leaves residual confounding that adjustment for the coarse measure cannot remove, and the discussion omits it.

DELIVERABLES

A Documented Adjustment Set

The items tie each adjusted estimate to a causal argument, so that a reviewer can see why the model contains what it contains.

Annotated Causal Diagram A diagram with a short justification for each arrow and the unmeasured variables shown, in a form that can be placed in a protocol or an appendix.

Adjustment Set Rationale A table giving, for each exposure and outcome pair, the variables adjusted for, those deliberately left out and the reason for each decision.

Adjusted and Unadjusted Estimates Estimates with 95% confidence intervals for each exposure, with the unadjusted result alongside, so a reader sees how far adjustment moved the estimate.

Unmeasured Confounding Check A quantification of how strong an unmeasured confounder would have to be to alter the conclusion, with the method named and its assumptions stated.

Scripts Tied to the Diagram Code that holds the diagram as an object, lists its adjustment sets and rebuilds the models, so the graph and the analysis cannot drift apart.

Assumption Note A note listing what the diagram assumes and which assumptions the data cannot check.

ILLUSTRATIVE EXAMPLE

Night Shift Work and the Question of Body Weight

An illustration of how a causal diagram settles whether a likely mediator belongs in the main model of an occupational cohort.

ILLUSTRATIVE EXAMPLE · NIGHT SHIFT WORK AND DIABETES COHORT RESEARCH · UNITED STATES

An epidemiology doctoral researcher used a cohort of hospital employees to ask whether rotating night shift work was associated with the later onset of type 2 diabetes, and which variables the model should contain.

The diagram came first. Age, sex, family history and socioeconomic position were drawn as common causes of both night shift work and diabetes, and body mass index as a probable mediator, since disrupted sleep and eating may raise weight. The complication came in review, when a coauthor wanted body mass index added to the main model. The diagram showed that doing so would remove part of the effect the paper was after, so the main model estimated the total effect without it, and a second model with it was labeled as a look at the remaining pathway. The paper also noted that employees who left night work because of early symptoms could distort the comparison.

Outcome: The researcher received the annotated diagram, the adjustment set table, the adjusted hazard ratio with its 95% confidence interval, the second model with its caveats, the scripts and an assumption note.

View Case Examples

This example does not describe a real client or project. We never share details of actual client work, in line with the confidentiality we promise every researcher. This illustrative example is included to show the type, scope, and standard of work involved in this kind of analysis.

SOFTWARE

Tools for Drawing the Graph and Fitting the Model

Drawing a diagram and fitting the adjusted model are separate tasks, and the program is chosen for the second while the first can be done in a dedicated tool.

HOW WE ASSESS YOUR PROJECT

We Review Your Actual Research

Your assessment is based on a review of your actual research materials and analytical requirements, not a generic project category.

1

You Submit Your Project Details

Share whatever is available at the current stage, such as the research aim, protocol or proposal, dataset, variable list, manuscript or statistical requirements.

2

We Review Your Research and Define the Scope

Your statistically trained Research Coordinator reviews the materials to understand the study design, research questions, data structure, analytical requirements and expected deliverables. If clarification is needed, additional documents or information can be requested before the assessment is finalized.

ProtocolVariable ListDatasetDraft DiagramReviewer Comments
3

Your Analysis Is Completed and Delivered

Once the scope and fixed project fee are agreed, the in-house statistician completes the work and the Research Coordinator remains the communication point through delivery, with the analysis, deliverables and timeline as agreed.

RESEARCH RESPONSIBILITY

Each Arrow Is a Claim the Researcher Defends

A diagram records the researcher's causal beliefs, so which arrows are drawn and what an adjusted estimate is taken to mean are scientific judgments that the researcher owns.

Agreed Statistical Support OnlineSPSS provides the agreed methodological, analytical and statistical reporting support, defined in a scope that is confirmed before any work begins.

No Intellectual Contribution OnlineSPSS does not claim any intellectual contribution to your research. Authorship of the protocol, the manuscript or the thesis remains yours.

Your Research Decisions The causal question, the arrows in the diagram, the interpretation of the estimates and the conclusions remain yours, with overall responsibility.

Confidential Handling Research data and project details are handled confidentially, project information is not published, and an NDA is available where required.

FREQUENTLY ASKED QUESTIONS

Diagrams, Covariates and Competing Graphs

Whether a diagram can be tested, which covariates belong in a model and what to do when researchers draw different graphs.

Confounder selection and DAGs at OnlineSPSS involve drawing a causal diagram from subject knowledge, reading the adjustment set from it, and fitting and reporting the models that follow, with the diagram’s assumptions stated. A diagram can be drafted for a protocol before any data exist, or reconstructed for a finished analysis that a reviewer has questioned.

Only in part. A diagram implies conditional independencies that can be tested, and a clear conflict points to a missing arrow or variable. Agreement does not confirm the diagram, because different diagrams can imply the same independencies, so the arrows remain assumptions defended by subject knowledge.

A cause of the outcome that does not affect the exposure is not a confounder, though adjusting for it can improve precision. A variable linked only to the exposure is different: adjusting for it can inflate variance and, where unmeasured confounding remains, amplify its bias.

Both can be analyzed. Each diagram gives its own adjustment set, the estimates are compared, and where they agree the conclusion is more secure. Where they differ, the results are reported under each diagram and the disagreement is stated as a limitation. The disagreement may also point to a variable worth measuring in a later study.

Your data and project details are handled confidentially, and project information is not published. Researcher names and institutions are not used publicly without permission. An NDA is available where required and can be arranged before sensitive materials are shared. Read more about confidentiality and data security.

You share your research question, design and relevant materials, such as the protocol or study aims, the variable list and the dataset, and a statistically trained Research Coordinator reviews the request and responds the same day. The analysis, deliverables, timeline and one fixed project fee are then confirmed before any work begins, so the timeline follows from the agreed scope.

Still have a question? Find more answers in our full FAQ.

View All FAQs →

NEXT STEP

A Diagram
Before the First Model

Every adjusted estimate rests on causal assumptions, stated or not, and a diagram puts them where coauthors and reviewers can examine each one.

No Commitment Required

Strictly Confidential

Fixed Project Fee

In-House PhD-Level Statisticians

Same-Day Response

Serving Researchers Since 2014