Tutorials › High-Dimensional Genomic Data Analysis › Testing Module Associations With Phenotypes

Co-Expression Networks · Tutorial 503 of 795

Testing Module Associations With Phenotypes

Choose and interpret suitable module–phenotype association models, while checking whether confounding or influential observations distort the results.

Advanced 11 min read

What You'll Learn

  • Relate a module eigengene to a quantitative phenotype using correlation and linear regression.
  • Test associations with binary or multi-category phenotypes using group comparisons or suitable outcome models.
  • Interpret adjusted associations and distinguish them from marginal associations.
  • Check model assumptions and identify confounding or influential samples.
  • Understand multiplicity and the limits of nominal p-values in module screening.

Why Test Module–Phenotype Associations?

A module eigengene summarizes the expression pattern of a module across samples. Once modules have been identified, a natural question is whether their eigengenes vary with a phenotype of interest. For example, does the eigengene of a hypothetical immune-related module tend to be higher in samples with higher inflammation scores? This is an association question: a statistical relationship does not, by itself, establish that the module causes a phenotype or that any gene in the module is responsible for it.

The analysis must reflect the kind of phenotype and the design. A quantitative phenotype can be related to an eigengene using correlation or regression. For a categorical phenotype, compare eigengene distributions across groups, or model the phenotype as an outcome. If other variables could explain part of an observed relationship, use an adjusted model and distinguish that estimate from the unadjusted association.

Definition: Let \(ME_{ik}\) denote the eigengene value for sample \(i\) and module \(k\). A module–phenotype association is a statistical relationship between \(ME_{ik}\) and a phenotype measured on the same sample. A marginal association describes their relationship without adjustment for other variables; an adjusted association describes their relationship conditional on specified covariates in a model.

A standard analysis assumes samples are independent observational units, the phenotype and eigengene are correctly paired, and the measurements and model are appropriate for the study design. Repeated samples from one individual, related individuals, or clustered sampling may violate independence; those designs need models that account for dependence rather than an ordinary independent-sample test.

Quantitative Phenotypes: Correlation and Regression

For a quantitative phenotype \(Y_i\), the Pearson correlation summarizes the direction and strength of a linear relationship with \(ME_{ik}\). A simple linear regression expresses the same relationship in phenotype units:

$$ Y_i = \beta_0 + \beta_1 ME_{ik} + \varepsilon_i. $$

Here \(\beta_1\) is the expected change in the phenotype for a one-unit increase in the eigengene, under the fitted model. The usual t-test of \(H_0:\beta_1=0\) requires independent errors, a correctly specified linear mean relationship, and constant error variance; exact small-sample inference additionally assumes normally distributed errors. A scatterplot should be examined for curvature and unusual observations. A correlation can be useful as a compact summary, but regression makes the phenotype’s units and covariate adjustment explicit.

Worked Example: A Quantitative Phenotype

Suppose six hypothetical samples have eigengene values \(x=ME_{ik}=(-2,-1,0,0,1,2)\) and phenotype values \(Y=(10,12,13,14,15,16)\), measured in hypothetical units. Assume for this calculation that samples are independent and a straight-line mean relationship with constant variance is plausible.

The sample means are \(\bar{x}=0\) and \(\bar{Y}=13.333\). The centered cross-product and eigengene sum of squares are

$$ S_{xY}=\sum_i(x_i-\bar{x})(Y_i-\bar{Y})=15,\qquad S_{xx}=\sum_i(x_i-\bar{x})^2=10. $$

Therefore the slope is \(b_1=S_{xY}/S_{xx}=15/10=1.500\) phenotype units per eigengene unit. The fitted intercept is \(b_0=\bar{Y}-b_1\bar{x}=13.333\). The residuals are \((-0.333,0.167,-0.333,0.667,0.167,-0.333)\), so \(SSE=\sum_i e_i^2=0.8333\). With \(df=n-2=4\), the residual variance estimate is \(MSE=0.8333/4=0.2083\), and

$$ SE(b_1)=\sqrt{\frac{MSE}{S_{xx}}} =\sqrt{\frac{0.2083}{10}}=0.1443,\qquad t=\frac{1.500}{0.1443}=10.39. $$

For a two-sided test with 4 degrees of freedom, \(p\) is approximately 0.0004841. The estimated correlation is \(r=15/\sqrt{10(23.333)}=0.9813\). Under the stated model assumptions, the data provide evidence of a positive linear association: the fitted phenotype increases by 1.500 units per eigengene unit. This small hypothetical example does not show that an eigengene change causes a phenotype change.

Categorical Phenotypes: Group Comparisons and Outcome Models

For a binary phenotype, one direct approach is to compare the mean eigengene between the two groups. With independent samples and approximately normal within-group errors, a two-sample t-test is appropriate. A pooled-variance t-test also assumes equal group variances; Welch’s t-test avoids that equality assumption and is often a reasonable default. For a phenotype with more than two categories, one-way ANOVA tests whether all group means are equal, assuming independent errors, a suitable mean structure, and (for the classical pooled ANOVA test) equal within-group variances. A significant omnibus test indicates that not all means are equal; it does not identify which pairs differ without follow-up comparisons.

The direction of modeling depends on the scientific question. Modeling the eigengene as the response compares eigengene means across phenotype groups. Alternatively, for a binary phenotype \(D_i\), logistic regression models the probability of the phenotype from an eigengene:

$$ \log\left(\frac{P(D_i=1\mid ME_{ik})}{1-P(D_i=1\mid ME_{ik})}\right) =\gamma_0+\gamma_1 ME_{ik}. $$

In this model, \(\exp(\gamma_1)\) is the fitted odds ratio for a one-unit increase in eigengene, assuming a linear relationship between the eigengene and the log odds. Logistic regression does not require normally distributed eigengene values, but does require independent observations, a correctly specified logit relationship, and sufficient information to estimate the coefficients. These models describe different conditional quantities; report which one was fitted rather than treating them as interchangeable.

Worked Example: Comparing a Binary Phenotype

Consider six hypothetical samples. Their eigengene values are \((-1,0,1)\) in the control group and \((0,1,2)\) in the case group. The values are on the same eigengene scale. Suppose independent sampling and approximately normal errors within groups are reasonable, and the observed group spreads do not suggest a severe variance difference.

The group means are \(\bar{x}_{control}=0\) and \(\bar{x}_{case}=1\); each group has sample standard deviation \(s=1\). The pooled standard deviation is therefore \(s_p=1\), and the estimated case-minus-control difference is \(1-0=1.000\) eigengene unit. The pooled standard error is

$$ SE=s_p\sqrt{\frac{1}{3}+\frac{1}{3}}=\sqrt{\frac{2}{3}}=0.8165,\qquad t=\frac{1.000}{0.8165}=1.225. $$

The degrees of freedom are \(3+3-2=4\); the two-sided p-value is approximately 0.288. These data do not provide strong evidence of a difference in mean eigengene between the groups at conventional significance levels. The estimated difference is still 1.000 eigengene unit; a non-small p-value is not proof that the group means are identical.

For a categorical phenotype with three or more groups, the same logic extends to an omnibus group comparison. For ordinal categories, treating category codes as a quantitative score imposes a particular trend model; use that coding only when equal spacing and a linear trend are scientifically defensible. Otherwise, model the categories as groups or use an appropriate ordinal outcome model.

Adjustment, Confounding, and Interpretation

A variable is a potential confounder when it is associated with both the eigengene and phenotype and may account for some of their observed relationship. A multiple linear regression can estimate the eigengene association conditional on measured covariates \(Z_{ij}\):

$$ Y_i=\beta_0+\beta_1 ME_{ik}+\sum_{j=1}^{q}\delta_j Z_{ij}+\varepsilon_i. $$

The coefficient \(\beta_1\) now describes the fitted phenotype difference per eigengene unit at fixed covariate values, under the model. It need not equal the marginal slope. Adjustment does not automatically remove bias: the relevant covariates must be measured and appropriately modeled, and inappropriate adjustment can also distort an association. Confounders should be chosen using subject-matter knowledge and the study design, not solely because their inclusion changes a p-value.

Worked Example: A Marginal Association Changes After Adjustment

Suppose six hypothetical samples fall into two strata, \(Z=0\) and \(Z=1\). In \(Z=0\), eigengene values are \(0,1,2\) and quantitative phenotype values are \(0,1,3\). In \(Z=1\), the values are \(4,5,6\) and \(10,11,13\). Assume independent errors, linearity within strata, and constant variance are reasonable working assumptions.

Ignoring \(Z\), the eigengene mean is 3 and the phenotype mean is \(38/6=6.333\). The centered eigengene values are \((-3,-2,-1,1,2,3)\), and centered phenotype values are \((-6.333,-5.333,-3.333,3.667,4.667,6.667)\). Their cross-product is \(66\), while \(S_{xx}=28\). Thus the marginal slope is \(66/28=2.357\) phenotype units per eigengene unit.

Now fit the model \(Y_i=\beta_0+\beta_1 ME_{ik}+\beta_2 Z_i+\varepsilon_i\). Within each stratum, \(S_{xx}=2\) and \(S_{xY}=3\), so the common adjusted slope is \((3+3)/(2+2)=1.500\). The fitted lines are \(Y=-0.167+1.500x\) for \(Z=0\) and \(Y=3.833+1.500x\) for \(Z=1\). The residuals in each stratum are \((0.167,-0.333,0.167)\), giving \(SSE=0.3333\). The model has \(df=6-3=3\), hence \(MSE=0.1111\). The eigengene variation remaining after accounting for stratum has sum of squares \(S_{xx}=4\), so \(SE(b_1)=\sqrt{0.1111/4}=0.1667\), and \(t=1.500/0.1667=9.000\) with 3 degrees of freedom. The two-sided p-value is approximately 0.0029.

Here the marginal and adjusted slopes differ because eigengene values and stratum are associated. The adjusted result describes the within-stratum relationship under this model; it does not prove that stratum is a confounder in every study, nor that adjustment has eliminated all confounding.

Diagnostics, Multiplicity, and Limitations

A test statistic and p-value are only as useful as the model and data behind them. For quantitative regression, inspect a scatterplot and residual-versus-fitted plot for curvature or changing variance; examine residuals for marked departures from normality when relying on small-sample t inference. For group comparisons, inspect group sizes, distributions, and spreads. A few samples can strongly influence a slope or correlation, especially if they have extreme eigengene values. Check leverage and influence measures, and calculate how key estimates change when an observation is omitted as a sensitivity analysis. An influential sample is not automatically erroneous; verify it and report the sensitivity rather than deleting it merely because it changes the result.

Worked Example: Detecting an Influential Sample

For four hypothetical samples, let eigengene values be \((-2,-1,1,2)\) and phenotype values be \((1,-1,1,-1)\). Their means are both 0, \(S_{xY}=-2\), \(S_{xx}=10\), and \(S_{YY}=4\), so \(r=-2/\sqrt{40}=-0.3162\). Now add a fifth sample with eigengene 10 and phenotype 10. With all five samples, both means are 2. The centered values are \(x=(-4,-3,-1,0,8)\) and \(Y=(-1,-3,-1,-3,8)\). Thus \(S_{xY}=78\), \(S_{xx}=90\), \(S_{YY}=84\), and \(r=78/\sqrt{7560}\approx0.8971\).

One high-leverage sample changes the correlation from a weak negative value to a strong positive value. The appropriate conclusion is that the apparent association is highly sensitive to that observation. Verify the measurement and sample identity, report the full-data result and a justified sensitivity analysis, and avoid presenting the full-data correlation as robust evidence without this qualification.

When many modules and phenotypes are tested, the collection of nominal p-values creates a multiple-testing problem: even if every null association is true, some small p-values can arise by chance. Define the testing family in advance and use a suitable multiplicity procedure, such as false-discovery-rate control, when screening many associations. Report effect estimates and uncertainty alongside p-values; statistical significance alone does not convey biological importance.

Standard model-based p-values also have limitations when modules, phenotypes, or covariates were selected after inspecting the same results. They generally do not account for such selection. Treating estimated eigengenes as fixed is a common working analysis, but it does not represent uncertainty from every stage of constructing the network. Independent validation or a design that separates exploration from confirmation can strengthen evidence. These cautions do not make association testing useless; they clarify what its estimates and tests support.

A practical comparison is: correlation gives a concise unadjusted linear summary; regression gives an effect estimate in phenotype units and accommodates covariates; t-tests and ANOVA compare eigengene means across categories; logistic regression models a binary phenotype’s odds. None substitutes for diagnostics, thoughtful covariate selection, or sensitivity checks.

Key takeaway: Match the association model to the phenotype and study design, state whether the result is marginal or adjusted, and investigate diagnostics and influential samples before interpreting module–trait p-values.

Check Your Understanding

Answer each question, then compare with the brief solutions.

  1. A regression estimates a slope of \(-0.40\) phenotype units per eigengene unit, with \(p=0.03\). State the estimated direction and what the p-value does and does not mean.
  2. A phenotype has three unordered categories. What is one direct way to test whether mean eigengene values differ across categories, and what does a significant omnibus test establish?
  3. Why might an adjusted eigengene slope differ from the marginal slope?
  4. Across 80 modules, one association has an unadjusted p-value of 0.02. Why is this not, by itself, strong evidence that the association is a confirmed discovery?

Solutions. (1) The fitted phenotype decreases by 0.40 units per eigengene unit. If the null slope is zero and the model assumptions hold, a test statistic at least this extreme in either direction has probability 0.03 under that null; this is not the probability that the null is true. (2) Use a one-way ANOVA if its assumptions are reasonable, or a suitable alternative. A significant omnibus result is evidence that not all group means are equal, not evidence that every pair differs. (3) The covariates may be associated with both the eigengene and phenotype, so conditioning on them changes the fitted comparison. (4) Many tests create opportunities for small p-values by chance; assess the testing family and apply suitable multiplicity control, then seek confirmation and consider the effect estimate and its uncertainty.

Clinical Biostats