Why Covariate Choice Matters
A difference in methylation between two groups can reflect the group contrast of interest, differences in the groups’ characteristics, or differences in how their samples were measured. For example, an age imbalance can create a methylation difference if age is related both to group membership and to methylation. A difference in cell composition can change a bulk-tissue measurement even if methylation within each cell type is unchanged. A technical factor can make one group’s measurements systematically higher because its samples were processed differently.
Covariate adjustment is therefore not a mechanical step of adding every available variable to a regression. The analyst must decide what each variable represents, whether it precedes or follows the exposure of interest, and whether the data contain enough overlap to separate its contribution from the group contrast. The same variable can be an appropriate adjustment variable for one scientific question and an inappropriate one for another.
A CpG-Level Model and What Adjustment Means
Let \(M_{ik}\) be the M-value for sample \(i\) at CpG \(k\), and let \(D_i\) indicate the group or exposure being compared, with \(D_i=1\) for the exposed or case group and \(D_i=0\) for the comparison group. A basic adjusted model for one CpG is
Here, \(\mathbf{C}_i\) contains measured covariates such as age, sex, cell-composition summaries, and technical variables. The coefficient \(\beta_{Dk}\) is the model’s adjusted difference in mean M-value between groups for samples with the same modeled covariate values. It is measured in M-value units. It is not automatically a causal effect: that interpretation requires additional assumptions about the study design, confounding, measurement, and model specification.
A regression adjustment is useful only to the extent that its model is suitable for the data. For the displayed linear model, the conditional mean must be adequately represented by the included terms; the observations must provide information to estimate the group contrast; and the standard errors must be appropriate for the study’s dependence and variance structure. A curved relationship with age, for example, may not be handled by a single linear age term. If samples are clustered or repeatedly measured, an independent-error analysis may also be unsuitable.
How Confounding Creates a Misleading Contrast
The following simple result shows why a group imbalance matters. Suppose, for one CpG, the conditional mean follows an additive model with a binary covariate \(C_i\):
Taking the mean within each group and subtracting gives
The unadjusted group difference therefore contains the conditional group contrast \(\beta_D\) plus a term due to the covariate imbalance. If the covariate has no relationship with methylation in this model (\(\gamma=0\)), or its distribution is the same in both groups, this particular source of distortion is absent. In real data, these conditions are not established merely by seeing a small change in a regression coefficient.
Worked Example: Age Imbalance Changes the Group Difference
Consider a hypothetical CpG measured in young and older participants. The data have the following group-specific mean M-values:
| Age group | Control mean M-value | Case mean M-value | Controls | Cases |
|---|---|---|---|---|
| Young | 1 | 2 | 80 | 20 |
| Older | 5 | 6 | 20 | 80 |
Within each age group, the case-minus-control difference is \(2-1=1\) M-value unit among young participants and \(6-5=1\) M-value unit among older participants. But the age distributions differ sharply: 80% of cases are older, compared with 20% of controls.
The overall case mean is
The overall control mean is
Thus, the unadjusted difference is \(5.2-1.8=3.4\) M-value units, even though the within-age differences are both 1 M-value unit. Under the additive model, the older-versus-young age difference is 4 units, and the case coefficient adjusted for age is 1 unit. This example checks the additive and common within-age difference pattern directly. In an actual study, age might require a more flexible term, and a causal interpretation would require more than this arithmetic.
Choosing Among Age, Sex, Cell Composition, and Technical Factors
Age and sex are often plausible pre-exposure covariates in observational comparisons, but they should be assessed in the context of the study rather than included by habit. Check how they are distributed across groups and whether their relationships with methylation are plausibly represented. If age has a nonlinear association with methylation, a linear term may leave residual confounding. If some sex categories occur almost exclusively in one group, the data may not support a stable within-category comparison.
Cell composition needs particular care in bulk methylation data. A bulk measurement reflects methylation across a mixture of cells, and differences in the proportions of cell types can contribute to a group difference. Earlier material on cell-type composition explains why these proportions matter for interpretation. Whether to adjust for them depends on the target question: composition may be a pre-existing confounder, a consequence of the exposure, or part of the biological response of interest.
If group membership can change cell composition, then adjusting for composition removes the portion of the observed difference that operates through that change. The adjusted coefficient is not simply a “better corrected” version of the total difference; it targets a comparison conditional on composition. Interpreting it as a direct causal effect requires strong assumptions, including appropriate control of confounding of the exposure–outcome and mediator–outcome relationships. Cell fractions also sum to one, so a model with an intercept should not include every fraction as an unrestricted separate predictor; one fraction must be omitted or a suitable composition representation used.
Technical variables such as processing batch or array position can affect measured values rather than the underlying biology. If technical assignments are associated with group membership, they may create a spurious group contrast and are commonly considered adjustment variables. However, adjustment works only when the design contains enough overlap to distinguish group from technical factor. A covariate cannot resolve perfect aliasing between group and batch.
Worked Example: Cell Composition Can Change the Estimand
Suppose hypothetical bulk-tissue data follow the simple mean relation \(M=2+3D+10C\), where \(D\) is group status and \(C\) is the proportion of a particular cell type. Assume the comparison group has mean \(C=0.20\), while the exposed group has mean \(C=0.30\). For this illustration, take the relation as correctly specified and assume the observed group difference in composition is caused by exposure.
The comparison-group mean is \(2+3(0)+10(0.20)=4\) M-value units. The exposed-group mean is \(2+3(1)+10(0.30)=8\) M-value units. The total group difference is therefore \(8-4=4\) units.
If composition is held at the same value in both groups, the model’s group coefficient is 3 M-value units. The remaining 1 unit of the total contrast comes from the composition shift: \(10(0.30-0.20)=1\). Thus, adjusting for \(C\) answers a conditional question and removes this pathway contribution under the stated model. In a real study, the assumption that exposure caused the composition difference and the assumptions needed for a causal decomposition would have to be justified; the regression coefficient alone does not establish them.
Worked Example: Technical Overlap and a Group Contrast
Suppose a hypothetical study measured a CpG in two processing batches. There are 10 cases and 10 controls. In batch A, there are 8 cases with mean 6 and 2 controls with mean 4. In batch B, there are 2 cases with mean 8 and 8 controls with mean 6. The values are M-values.
The unadjusted case mean is \(\{8(6)+2(8)\}/10=6.4\); the control mean is \(\{2(4)+8(6)\}/10=5.6\). The unadjusted difference is \(0.8\) M-value units.
Within batch A, the case-control difference is \(6-4=2\); within batch B, it is \(8-6=2\). A model with batch and group terms therefore estimates a group difference of 2 units under the common-difference model. Both groups occur in both batches, so the contrast is estimable in this example. The different unadjusted and within-batch contrasts show how the unequal batch allocation affects the marginal comparison.
If instead every case had been measured in batch A and every control in batch B, group and batch would be perfectly aligned. A model containing both terms could not uniquely attribute the observed difference to either one: the design provides no within-batch case-control comparison. This is a failure of identification, not a problem solved by adding more terms to the same regression.
Diagnostics, Alternatives, and Failure Modes
Before fitting a CpG-level model, inspect covariate distributions by group. For categorical factors, use counts or a cross-tabulation. For continuous factors, compare distributions rather than relying only on means. Check overlap: are there cases and controls at comparable ages, in each relevant sex category, and across technical levels? A large imbalance or an empty group-by-factor cell warns that the adjusted contrast may depend heavily on model assumptions or may not be estimable at all.
Then consider whether the model represents the covariate relationships plausibly. Examine age trends, influential observations, residual patterns, and whether the group contrast appears to vary across covariate levels. A single group coefficient assumes a common contrast unless interactions are included. For example, if group differences differ by sex, a model with only additive sex adjustment reports a restricted average conditional contrast, not separate sex-specific contrasts. Standard errors should reflect the design and residual variance; a well-chosen covariate list does not compensate for an inappropriate uncertainty calculation.
Adjustment is not the only way to address an imbalance. Stratified comparisons can display within-stratum contrasts directly when there are few relevant strata and adequate data in each. Standardization can compare groups after averaging model-based predictions over a specified covariate distribution. These approaches make different assumptions and can target different summaries. In high-dimensional methylation analysis, regression adjustment is often convenient across many CpGs, but convenience does not validate the covariate set or the model.
Several warning signs deserve particular attention:
- Near or perfect confounding: group and technical factor have little or no overlap. Estimates may be unstable or not separately identifiable.
- Overadjustment: a variable on the exposure-to-methylation pathway is included even though the target is the total effect.
- Incorrect functional form: a linear age term is used despite a substantially nonlinear age relationship.
- Compositional redundancy: all cell fractions are entered with an intercept, producing exact dependence among predictors.
- Coefficient change treated as proof: a change after adjustment is evidence that the model’s conditional comparison differs from the marginal one, but does not by itself prove that the removed component was confounding.
A common mistake is to adjust for every variable that differs between groups and then call the remaining coefficient the “true” methylation effect. This reasoning ignores whether a variable is a confounder, mediator, collider, or merely a proxy, and it ignores overlap and model assumptions. Instead, define the scientific contrast first, draw or state the plausible temporal relationships, inspect the design, and explain what conditional comparison the chosen model estimates. If technical factor and group are inseparable, report that limitation rather than claiming adjustment has solved it.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A case group is older on average than a control group, and age is associated with methylation at a CpG. What should be checked before interpreting an unadjusted group difference?
- In a study, exposure may change cell composition, which in turn affects bulk methylation. What is the consequence of adjusting for composition?
- All cases were measured in one batch and all controls in another. Why is adding batch to the regression not sufficient to identify a group effect?
- Why does a change in the group coefficient after covariate adjustment not, by itself, prove that the covariate was a confounder?
Solutions. (1) Compare age distributions and assess overlap, then check whether age is adequately modeled, including possible nonlinearity. The unadjusted contrast can mix the group difference with the age imbalance. (2) Adjustment conditions on composition and removes the part of the association operating through composition under the model; it therefore changes the estimand from a total contrast toward a conditional one. A direct causal interpretation needs additional assumptions. (3) Group and batch are perfectly aligned, so there is no within-batch group comparison. Their separate effects are not identifiable from these data. (4) Adjustment changes the comparison being made and can change a coefficient for multiple reasons, including mediation, model misspecification, or sampling variation. Confounder status depends on the variable’s causal role, not just on the size of a coefficient change.