Free scoping read. A written assessment of your manuscript in two business days, at no cost.

Start one
Contents

Academy · Systematic review · Variables explained

Independent, Dependent, Moderator and Mediator Variables: Definitions and Analytical Implications

The label assigned to a third variable determines how it is handled in the analysis, and adjustment for a mediator removes the very effect under investigation.

Pubrica AcademyWritten by a research writing specialist Reviewed bya research methodology reviewer Published15 October 2026 Last checked15 October 2026 Reading time14 minutes Sources10 primary

The label assigned to a variable determines how it is handled in the analysis, and two of the labels discussed here, moderator and mediator, are routinely interchanged, with consequences for what a study can conclude. This article sets out the distinctions as defined in the methodological sources, including the point at which the standard method for testing one of them has been superseded.

Summary of variable types

Table 1. Variable roles and what each implies

RoleWhat it isNotes
Independent variable, or exposure, determinant, predictorThe variable whose influence is under study.In observational work, exposure or predictor is more precise; STROBE notes that the term “independent variable” does not distinguish exposures from confounders.
Dependent variable, or outcomeThe variable in which change is measured.—
Moderator, or effect modifierChanges when or for whom the effect holds.A subgroup question. It should be pre-specified, or the result treated as exploratory.
MediatorExplains how or why the effect occurs.Adjustment for a mediator removes the effect being estimated. It should never be treated as a control variable.
ConfounderShares a common cause with both exposure and outcome.Chosen for adjustment from causal reasoning, not from p-values.
Control variable, or covariateA variable adjusted for to isolate the relationship of interest.A role in an analysis rather than a property of a variable, which is why the term is readily misused.

Independent and dependent variables and more precise terminology

Precise terminology for exposures and confounders

The usual objection to the term “independent variable” is that nothing is manipulated outside an experiment. The objection raised by STROBE is more precise and more useful: the term “is not precise, as it does not distinguish exposures from confounders”. In observational research, exposure, determinant or predictor state the intended meaning precisely, whereas “independent variable” conflates the variable under study with the variables for which the analysis adjusts.

STROBE's recommendation: “For some studies, 'determinant' or 'predictor' may be appropriate terms for exposure variables”4, because “The latter is not precise, as it does not distinguish exposures from confounders.”4

Distinction between moderators and mediators

The canonical statement remains the best: “Whereas moderator variables specify when certain effects will hold, mediators speak to how or why such effects occur.”1 The same paper stresses “the importance of not using the terms moderator and mediator interchangeably”1

In their terms, a moderator is “a moderator is a third variable that affects the zero-order correlation between two other variables.”1, and may be “a moderator is a qualitative (e.g., sex, race, class) or quantitative (e.g., level of reward) variable”1. Mediators, by contrast, “Mediators explain how external physical events take on internal psychological significance.”1

Clinical relevance. A moderator “suggests on whom or under what conditions treatment choice differentially affects outcome”9; a mediator “suggests how or why the treatment condition might be preferred to the control condition”9 Get the classification wrong and “if such a baseline factor is a moderator and not a nonspecific predictor, the conclusion based on such an analysis will be wrong.”9 The cost is not only to one analysis: “Ignored moderators may be one explanation for why so many psychiatric treatments appear to have such low effectiveness.”9

STROBE's framing of the same idea, for observational work: “Interaction relates to the situation when one factor modifies the effect of another”4

Current methods for testing mediation

Citation of the 1986 concepts and the 2010 method

Presenting the three-step procedure of Baron and Kenny as current practice would be outdated, and the correction is more substantial than is usually acknowledged. Their second step requires the independent variable to be shown to affect the outcome. Zhao, Lynch and Chen do not merely describe that step as unnecessary; they write that “the X-Y test is never relevant to establishing mediation”. They also reject the Sobel test, which is often presented as the modern alternative, and name a single replacement: the bootstrap test of the indirect effect. The 1986 paper should therefore be cited for the concepts (its “when” versus “how or why” formulation remains the clearest concise statement of the distinction) and the 2010 paper for the method.

For the record, the superseded procedure as Baron and Kenny set it out: “First, the independent variable must affect the mediator in the first equation;”1 “second, the independent variable must be shown to affect the dependent variable in the second equation;”1 “third, the mediator must affect the dependent variable in the third equation.”1 It is the second of those that later methodologists reject.

The correction: “There need not be a significant zero-order effect of X on Y”2 — “We maintain that the X-Y test is never relevant to establishing mediation.”2 In its place they put one test, “the bootstrap test of the indirect effect”2, and they are specific that it should be the bootstrap rather than the older alternative: “use the more rigorous and powerful bootstrap test, not Sobel”2

A second group reaches the same conclusion, noting that “some of the field's requirements and considerations regarding mediation analysis seem outdated.”3 Their recommendation: “We recommend that mediation analyses focus on examining the magnitude of indirect effects.”3, tested by “tested the significance of the indirect effect using bias-corrected bootstrap 95% confidence intervals (CIs)”3. They also question a familiar pair of labels — “the meaningfulness and utility of the 'full' and 'partial' mediation labels is limited in our view.”3

Confounders

Two non-equivalent definitions of confounding

Two definitions are in circulation, and they are not equivalent. The epidemiological definition is causal: “confounding arises when the exposure and the outcome of interest share a common cause”. The older definition, still common in teaching texts, is associational: a variable related to both exposure and outcome. A variable can satisfy the second definition without satisfying the first, and methodologists have argued that the associational definition “is inadequate”. The common-cause definition should take precedence; where the associational definition is encountered, it should be treated as an approximate screen rather than a definition.

The current authoritative statement: “confounding arises when the exposure and the outcome of interest share a common cause.”5 A confounder is “a variable that is responsible for confounding”5 — more precisely, “a cause of the outcome that is associated with exposure but not affected by exposure”5

The final clause is the decisive one: not affected by exposure. A variable that the exposure influences is on the causal pathway, which makes it a mediator rather than a confounder, and adjusting for it does damage rather than removing bias. On the older definition, “The developments in causal inference over the past two decades have made clear that this definition of a 'confounder' is inadequate.”6

Control variables and the risk of inappropriate adjustment

Limits of the literature on control variables

The literature does not provide a precise authoritative definition of “control variable”. The leading critical review of the practice does not offer one. It describes the function of controls, which “mathematically remove variance associated with nonfocal variables”, and criticises their use, observing that “very little effort is made to explain why and how controls relate to focal variables of interest”. This absence is informative. “Control variable” describes a role in an analysis rather than a property of a variable, which partly explains why the term is so readily misapplied.

What controls do: they “mathematically removes variance associated with nonfocal variables”7. The criticism of how they are used is that “very little effort is made to explain why and how controls relate to focal variables of interest”7, and the consequence can be “an incorrect conclusion that the predictor is not related to the criterion”7

Adjustment for a mediator as a source of bias

This hazard connects the two halves of the article. If a mediator is mistaken for a control variable and adjusted for, the very effect under estimation is removed. STROBE warns that inappropriate decisions “may introduce bias, for example, by including variables that are in the causal pathway between exposure and disease”. Moreover, the criterion for selection is not statistical: “P values are not an appropriate criterion for selecting which confounders to adjust for in analysis”. The decision is made on the basis of subject knowledge and stated assumptions about causal structure, before the analysis.

STROBE's two rules for the decision: “Decisions about excluding or including variables should be guided by knowledge, or explicit assumptions, on causal relations.”4 And, negatively: “P values are not an appropriate criterion for selecting which confounders to adjust for in analysis.”4 A variable does not earn adjustment by being statistically associated with something; it earns it by occupying a particular position in the causal structure you have reasoned about.

The term “extraneous variable”

Teaching vocabulary versus journal vocabulary

A note on terminology. “Extraneous variable” appears in undergraduate research methods teaching, but it was not found in any of the authoritative sources consulted for this article: the reporting guidelines, the trial guideline, the cancer-research methods volume and the methods papers. Their vocabulary is confounder, covariate, effect modifier, exposure and outcome. This reflects an absence across the sources consulted rather than proof that the term is never used, but for journal writing the second set of terms is preferable.

Levels of measurement

Table 2. The four scale types, as characterised by Velleman and Wilkinson

ScaleWhat it isFormal property
NominalCategories with no orderDo not require the assignment of numerical values.
OrdinalOrdered categories, unequal intervalsAny monotone transformation of the values is permissible.
IntervalOrdered, with meaningful differencesInvolve a difference operator instead of an order operator.
RatioInterval, with a meaningful zeroHave a defined zero, which may not be changed.

Levels of measurement as vocabulary rather than a decision procedure

This caveat belongs with the table rather than after it. The paper from which these characterisations are drawn argues that the typology should not be used to select a statistical method: “the use of Stevens's categories in selecting or recommending statistical analysis methods is inappropriate”, and the “single unifying argument against proscribing statistics based on scale type is that it does not work”. The four levels are therefore useful vocabulary for describing data but an unsound basis for a flowchart for selecting statistical tests.

The argument in the authors' own words: “the use of Stevens's categories in selecting or recommending statistical analysis methods is inappropriate”8, and “the single unifying argument against proscribing statistics based on scale type is that it does not work.”8

The characterisations in Table 2 are from that paper, which describes the typology in order to argue against using it to choose a method. They are quoted as that paper renders them rather than attributed to the typology's originator.

Pre-specification of moderators

Protocol specification of moderators and exploratory analyses

Testing a moderator constitutes a subgroup analysis, and is therefore subject to a rule that should be understood before such an analysis is planned. ICH E9 states that “in most cases, however, subgroup or interaction analyses are exploratory and should be clearly identified as such”, that “sparing use should be made of unplanned analyses”, and that “only results from analyses envisaged in the protocol (including amendments) can be regarded as confirmatory”. A moderator relevant to the research question should be named in the protocol. A moderator identified afterwards constitutes a hypothesis, not a finding.

ICH E9's position in full: “In most cases, however, subgroup or interaction analyses are exploratory and should be clearly identified as such;”10 Where the interaction was expected in advance, “hence a subgroup analysis or a statistical model including interactions is part of the planned confirmatory analysis.”10 Otherwise, “When exploratory, these analyses should be interpreted cautiously”10, and a conclusion “based solely on exploratory subgroup analyses is unlikely to be accepted”10 by a regulator. More generally, “In general, sparing use should be made of unplanned analyses.”10, since “The potential dangers of over-interpretation of unplanned subgroup analyses are well known”10

And the line that settles it: “Only results from analyses envisaged in the protocol (including amendments) can be regarded as confirmatory.”10 For observational work, STROBE asks the same of you in the write-up: “Readers need to know which subgroup analyses were planned in advance, and which arose while analyzing the data.”4

One limit on what is claimed here: the section of ICH E9 quoted above warns against over-interpreting unplanned subgroup analyses but does not tie subgroup analysis to a multiplicity adjustment, so no such requirement is attributed to it. Our page on significance and effect size covers the multiplicity problem itself.

Working practices

Practical application

  1. Each third variable should be classified as a moderator, a mediator, a confounder or a control before the analysis, and the reasoning recorded. The label determines the handling.
  2. The when-versus-how test should be applied: a moderator indicates when or for whom the effect holds; a mediator indicates how or why it occurs.
  3. A mediator should not be adjusted for. It lies on the causal pathway, and adjustment removes the effect being estimated.
  4. Confounders should be selected through causal reasoning, not from p-values or stepwise selection.
  5. Mediation should be tested with a bootstrapped test of the indirect effect. The independent variable need not be shown to predict the outcome first, and the Sobel test should not be used.
  6. In observational research, the terms exposure, determinant or predictor are preferable to independent variable, so that the exposure is distinguishable from the confounders.
  7. Any moderator relevant to the research question should be pre-specified. A moderator identified afterwards constitutes a hypothesis for a subsequent study.
  8. A statistical test should not be selected on the basis of the level of measurement alone.
  9. The terms confounder, covariate and effect modifier are preferable to extraneous variable in journal writing.

Key points

A moderator indicates when or for whom an effect holds; a mediator indicates how or why it occurs, and the two are not interchangeable. Baron and Kenny remain the appropriate citation for this distinction but not for the method: the requirement that the independent variable predict the outcome has been rejected outright, and the recommended test is a bootstrapped indirect effect. A confounder shares a common cause with exposure and outcome and is not affected by the exposure; a variable that the exposure influences is a mediator, and adjustment for it removes the effect under study. Adjustments should be selected through causal reasoning, not p-values. The four levels of measurement do not determine which statistical test should be used.

Baron and Kenny’s formulation remains the clearest concise statement: “whereas moderator variables specify when certain effects will hold, mediators speak to how or why such effects occur.” A moderator changes the size or direction of an effect across subgroups; a mediator is the mechanism through which the effect operates. The same paper stresses “the importance of not using the terms moderator and mediator interchangeably”.

Its conceptual distinction remains current; its three-step testing procedure does not. Zhao, Lynch and Chen state that “there need not be a significant zero-order effect of X on Y” and go further: “we maintain that the X-Y test is never relevant to establishing mediation.” They recommend a single replacement, the bootstrap test of the indirect effect, and also reject the Sobel test.

In observational research, exposure, determinant or predictor is more precise. STROBE notes that “independent variable” “is not precise, as it does not distinguish exposures from confounders”, which is a more substantive objection than the usual one that nothing has been manipulated.

On the current epidemiological definition, “confounding arises when the exposure and the outcome of interest share a common cause”, and a confounder is “a cause of the outcome that is associated with exposure but not affected by exposure”. The older definition — anything associated with both — has been argued to be inadequate, because it does not distinguish a common cause from a variable on the causal pathway.

No. Adjustment for a variable on the causal pathway removes the effect under estimation. STROBE warns that inappropriate decisions “may introduce bias, for example, by including variables that are in the causal pathway between exposure and disease”. This is the most consequential practical error discussed in this article.

On the basis of subject knowledge and stated causal assumptions, before the analysis. STROBE is explicit on both points: “decisions about excluding or including variables should be guided by knowledge, or explicit assumptions, on causal relations”, and “P values are not an appropriate criterion for selecting which confounders to adjust for in analysis”.

No. The paper that popularised the critique states that “the use of Stevens’s categories in selecting or recommending statistical analysis methods is inappropriate”, because “the single unifying argument against proscribing statistics based on scale type is that it does not work.” The levels are useful vocabulary for describing data, not a decision procedure.

Yes, if the result is to be regarded as confirmatory. ICH E9 states that “in most cases, however, subgroup or interaction analyses are exploratory and should be clearly identified as such”, that “sparing use should be made of unplanned analyses”, and that only analyses envisaged in the protocol “can be regarded as confirmatory”.

References

  1. Baron RM, Kenny DA. The moderator-mediator variable distinction in social psychological research: conceptual, strategic, and statistical considerations. Journal of Personality and Social Psychology. 1986;51(6):1173–1182. read 15 October 2026. View on a university-hosted full textThe source of the conceptual distinction, which has not been superseded. Its three-step procedure for testing mediation has been; see the 2010 paper. Read from a university course copy.
  2. Zhao X, Lynch JG Jr, Chen Q. Reconsidering Baron and Kenny: myths and truths about mediation analysis. Journal of Consumer Research. 2010;37(2):197–206. read 15 October 2026. View on a university course copyThe corrective on method. It rejects both the requirement that the independent variable predict the outcome and the Sobel test, and names one replacement: the bootstrap test of the indirect effect.
  3. Rucker DD, Preacher KJ, Tormala ZL, Petty RE. Mediation analysis in social psychology: current practices and new recommendations. Social and Personality Psychology Compass. 2011;5(6):359–371. read 15 October 2026. View on a university-hosted full textCorroborates the shift to indirect-effect estimation and questions the usefulness of the full-versus-partial mediation labels.
  4. Vandenbroucke JP, von Elm E, Altman DG, Gøtzsche PC, Mulrow CD, Pocock SJ, Poole C, Schlesselman JJ, Egger M. Strengthening the Reporting of Observational Studies in Epidemiology (STROBE): explanation and elaboration. Annals of Internal Medicine. 2007;147(8):W163–W194. read 15 October 2026. View on a journal-hosted copyThe source for the objection to the term independent variable, and for how to decide what to adjust for. Read from a mirrored copy rather than the publisher.
  5. Richardson DB, Costello S, Kaufman JS, et al. Confounding: a routine concern in the interpretation of epidemiological studies. Chapter 3 in: Statistical Methods in Cancer Research, Volume V. IARC Scientific Publication No. 171. Lyon: International Agency for Research on Cancer, 2024. read 15 October 2026. View on IARCThe common-cause definition of confounding, from a current authoritative source. Note the same chapter also uses looser associational language descriptively, so the two framings coexist even here.
  6. VanderWeele TJ, Shpitser I. On the definition of a confounder. arXiv:1304.0564. doi:10.1214/12-AOS1058 read 15 October 2026. View on arXiv (HTML rendering)Cited for one narrow point: that the traditional associated-with-both definition of a confounder is inadequate. Journal, volume and pages were not shown on the version we read, so they are not stated.
  7. Bernerth JB, Aguinis H. A critical review and best-practice recommendations for control variable usage. Personnel Psychology. 2016;69:229–283. read 15 October 2026. View on the author's own siteThe leading review of control variable practice. Notably it describes the practice rather than defining the term, which is itself informative: control variable is a practice label, not a crisp technical category.
  8. Velleman PF, Wilkinson L. Nominal, ordinal, interval, and ratio typologies are misleading. The American Statistician. 1993;47(1):65–72. read 15 October 2026. View on a university-hosted full textCited both for the four scales as this paper characterises them and for its central argument against using them to choose a statistical method.
  9. Kraemer HC. Messages for clinicians: moderators and mediators of treatment outcome in randomized clinical trials. American Journal of Psychiatry. 2016;173(7):672–679. read 15 October 2026. View on American Journal of PsychiatryThe source for what the distinction costs when it is got wrong, in a clinical trial context. The article page carried no author line; authorship is corroborated from an independent reference list rather than read directly.
  10. ICH Harmonised Tripartite Guideline E9: Statistical Principles for Clinical Trials, Section V.G, Subgroups, Interactions and Covariates. FDA Guidance for Industry, September 1998. read 15 October 2026. View on FDA guidance (HHS)Cited for the pre-specification requirement and for the status of unplanned subgroup analyses. Note it does not tie subgroup analysis to multiplicity adjustment, so no such claim is attributed to it.

Pubrica AcademyWritten and maintained by Pubrica’s subject matter experts. Articles are revised when the underlying standards change, and each article states the date on which it was last reviewed.

Related: comparing study designs · biostatistics concepts that get misstated · significance versus effect size.

How Pubrica can help

Pubrica biostatisticians support analysis planning: specifying which variables are exposures, confounders, mediators and moderators before the analysis, justifying the adjustment set through causal reasoning rather than stepwise selection, and pre-specifying subgroup analyses so that the results can stand as confirmatory.

Get a free quote

Regulations

Check your project against this rule

  1. 1Your work
  2. 2Your details
  3. 3Send
What do you need?

Material you send is held under signed confidentiality, with access limited to the assigned team and encrypted transfer. It is not used to train anything and is not passed to third-party tools. Ask for the agreement before you send anything you would rather cover first.