Tutorials › High-Dimensional Genomic Data Analysis › Reporting Gene-Level Effects and Moderated Tests

Linear Models for Expression Microarrays · Tutorial 413 of 795

Reporting Gene-Level Effects and Moderated Tests

Build a transparent gene-level results table that communicates effect size, uncertainty, and moderated-test evidence in the context of a clearly specified expression model.

Intermediate 12 min read

What You'll Learn

  • State a gene-wise linear model, its design, and the contrast being tested.
  • Calculate a moderated variance, standard error, test statistic, degrees of freedom, and confidence interval.
  • Distinguish log2-scale effect estimates from standard errors, p-values, and fold changes.
  • Choose table columns that let readers assess both magnitude and uncertainty.
  • Report multiplicity-adjusted evidence without treating it as an effect size.
  • Diagnose common problems in model specification and empirical-Bayes reporting.

From Model to Gene-Level Result

A gene-level results table is a compact account of a fitted model, not merely a ranked list of p-values. For each gene, a reader should be able to identify the effect being estimated, its units, how uncertain it is, and what hypothesis the test addresses. These details matter in microarray analysis, where effects are often measured on a log2 expression scale and residual variances are moderated across genes.

The table is interpretable only when the model and contrast are described. For example, “group effect” is not enough: the reader needs to know which groups are compared, in which direction, and whether the estimate is a difference in mean log2 expression or some other contrast. A positive contrast estimate can then be translated into a fold change, while its standard error and interval describe uncertainty on the log2 scale.

Definition: For gene \(g\), a gene-wise linear model is \(y_g=X\beta_g+\epsilon_g\), where \(y_g\) is the vector of observed log2 expression values across samples, \(X\) is the design matrix, \(\beta_g\) is the coefficient vector, and \(\epsilon_g\) is the residual vector. For a specified contrast \(c\), the estimated effect is \(\hat{\theta}_g=c^\mathsf{T}\hat{\beta}_g\). It is a difference or combination of model coefficients, expressed in the units of \(y_g\).

The usual model assumptions are that the design matrix has full column rank, the model represents the systematic mean structure adequately, and residuals are approximately independent and normally distributed with mean zero and gene-specific variance \(\sigma_g^2\). A paired or blocked design must represent the dependence structure in the observations; treating dependent samples as independent does not become valid merely because variance moderation is used. The empirical-Bayes step additionally assumes that gene-wise residual variances can be usefully related through a common prior distribution, possibly with a mean-variance trend when that is part of the fitted procedure.

Let \(s_g^2\) be the ordinary residual variance estimate for gene \(g\), based on \(d_g\) residual degrees of freedom. In a standard moderated linear model, this estimate is combined with a prior variance \(s_0^2\) and prior degrees of freedom \(d_0\). The moderated variance, contrast standard error, test statistic, and approximate degrees of freedom are:

$$ \tilde{s}_g^2=\frac{d_0s_0^2+d_gs_g^2}{d_0+d_g}, \qquad SE(\hat{\theta}_g)=\sqrt{\tilde{s}_g^2\,c^\mathsf{T}(X^\mathsf{T}X)^{-1}c}, \qquad t_g=\frac{\hat{\theta}_g}{SE(\hat{\theta}_g)}, \qquad df_g=d_0+d_g. $$

The displayed degrees of freedom describe the moderated test under the procedure’s assumptions; empirical-Bayes hyperparameters are estimated from the collection of genes, so the reference distribution is generally an approximation. A two-sided test of \(H_0:c^\mathsf{T}\beta_g=0\) uses the tail probability from a \(t\) distribution with \(df_g\) degrees of freedom. A confidence interval at level \(1-\alpha\) is the estimate plus or minus the corresponding \(t\) critical value times its moderated standard error. It expresses uncertainty in the contrast’s log2 units.

Worked Calculations

Worked Example: A Two-Group Contrast and Its Interval

Suppose a hypothetical microarray analysis compares treatment with control. The model is fitted to normalized log2 expression, and the contrast is treatment minus control. For one hypothetical gene, the estimated contrast is \(0.80\) log2 expression units, the ordinary residual variance is \(s_g^2=0.16\), and \(d_g=8\). Suppose the fitted prior has \(s_0^2=0.25\) and \(d_0=6\), and the contrast variance factor is \(c^\mathsf{T}(X^\mathsf{T}X)^{-1}c=0.50\).

First combine the residual and prior variances:

$$ \tilde{s}_g^2 =\frac{6(0.25)+8(0.16)}{6+8} =\frac{1.50+1.28}{14} =0.1985714. $$

The moderated standard error is therefore \(\sqrt{0.1985714(0.50)}=\sqrt{0.0992857}=0.3151\) log2 expression units. The test statistic is \(0.80/0.315096\approx2.539\), with \(df=14\). A two-sided \(t\)-test gives \(p\approx0.02362\). Using the 95% critical value \(t_{0.975,14}\approx2.145\), the interval is \(0.80\pm2.145(0.3151)\), or approximately \([0.124,1.476]\) log2 units.

The estimated treatment-to-control expression ratio is \(2^{0.80}\approx1.74\). Transforming the interval endpoints gives an approximate ratio interval \([2^{0.124},2^{1.476}]\), or \([1.09,2.78]\). The model estimates higher expression in treatment for this gene, but the interval is wide enough to show considerable uncertainty in the magnitude.

Worked Example: Reporting a Strong Moderated Test

Consider another hypothetical gene and a prespecified treatment-minus-control contrast. Suppose the estimated effect is \(0.60\) log2 units, the moderated variance is \(0.012\), the contrast variance factor is \(1\), and the moderated degrees of freedom are \(10\). The model is assumed to have been fitted with an appropriate design and a valid variance-moderation fit.

The moderated standard error is \(\sqrt{0.012}=0.1095445\) log2 units. Using the unrounded standard error, the test statistic is \(0.60/\sqrt{0.012}=5.477\), with \(df=10\); the two-sided p-value is approximately \(0.00027\). The 95% interval uses \(t_{0.975,10}\approx2.228\):

$$ 0.60\pm2.228\sqrt{0.012} \approx 0.60\pm0.244 =[0.356,\ 0.844]\ \text{log2 units}. $$

The estimated expression ratio is \(2^{0.60}\approx1.52\), and the interval transforms to approximately \([2^{0.356},2^{0.844}]=[1.28,1.795]\). The small p-value is evidence against a zero contrast under the model; it is not a measure of the effect’s size. The estimate and interval convey magnitude and uncertainty.

Worked Example: A Contrast Combining Model Coefficients

In a hypothetical factorial microarray experiment, the model includes a treatment coefficient and a treatment-by-condition interaction coefficient. Suppose the target is the treatment effect in the second condition, defined as the sum of those two coefficients. For a particular hypothetical gene, the estimated contrast is \(0.75\) log2 units, \(s_g^2=0.12\), and \(d_g=6\). Let the prior values be \(s_0^2=0.16\) and \(d_0=8\), and suppose the design gives contrast variance factor \(8/15\).

The contrast is stated explicitly as the sum of coefficients, so its standard error must use the variance of that sum, represented here by the supplied contrast variance factor. The moderated variance and standard error are:

$$ \tilde{s}_g^2 =\frac{8(0.16)+6(0.12)}{14} =\frac{1.28+0.72}{14} =0.1428571, \qquad SE=\sqrt{0.1428571(8/15)} =\sqrt{0.0761905} =0.2760. $$

Thus \(t=0.75/0.276026\approx2.717\), with \(df=14\), giving a two-sided p-value of approximately \(0.017\). A 95% interval is \(0.75\pm2.145(0.2760)\), approximately \([0.158,1.342]\) log2 units. Reporting the coefficient sum as though it were the treatment coefficient alone would answer a different scientific question; the contrast definition belongs in the model description or table caption.

What a Results Table Should Communicate

A useful table has a row for each gene and enough columns to reconstruct the meaning of the reported result. A typical set of columns for one contrast is shown below. The precise software output may use different names, but the statistical meanings should remain clear.

ColumnMeaning and reporting guidance
Gene identifierStable identifier, with gene symbol included when available; distinguish missing symbols from missing test results.
Contrast estimate\(\hat{\theta}_g\), in log2 expression units, with the direction of the contrast stated.
Moderated standard errorUncertainty of the contrast estimate on the same log2 scale; do not label it as a standard deviation of expression.
Moderated \(t\) statistic and \(df\)Signed test statistic and its degrees of freedom for the stated null hypothesis.
Raw p-valueEvidence against the gene-specific null under the fitted model, before adjustment across genes.
Adjusted p-valueMultiplicity-adjusted measure, such as a Benjamini–Hochberg adjusted p-value, with the procedure and testing family identified.
Confidence intervalInterval for the contrast, preferably with its confidence level and log2 units stated.
Optional fold change\(2^{\hat{\theta}_g}\), a ratio corresponding to the log2 contrast; explain numerator and denominator.

If thousands of genes are tested, a table should distinguish raw from adjusted p-values and state the correction method and which tests were included in the adjustment. A small adjusted p-value addresses multiplicity under that procedure; it does not imply a large or biologically important effect. Conversely, a substantial estimated effect with a broad interval may be imprecise. Reporting the estimate, interval, and adjusted evidence together prevents either situation from being reduced to a ranking by p-value alone.

A concise model description should identify the expression scale and preprocessing, the design factors and any blocking or covariate terms, the contrast and its direction, the variance-moderation procedure, and the multiple-testing adjustment. It should also state the gene filtering or testing family when relevant. This is more informative than naming software alone, because software labels do not tell readers which samples were compared or which coefficient combination was tested.

Checks, Alternatives, and Limitations

Before distributing a table, verify that the contrast is estimable under a full-rank design, that its sign matches the stated direction, and that all reported units agree. Check that standard errors are positive and that the interval is centered on the estimate up to rounding. For each gene, the statistic should satisfy \(t_g=\hat{\theta}_g/SE(\hat{\theta}_g)\), apart from display rounding. Check residual diagnostics and influential samples, and assess whether the variance trend or prior fit is plausible. Sensitivity to empirical-Bayes settings is particularly relevant when the prior fit is unstable or a small subset of genes behaves differently from the bulk.

Moderated tests borrow information across genes to stabilize variance estimates, which is valuable when sample sizes are small. An ordinary gene-wise \(t\)-test instead uses each gene’s residual variance without this borrowing and may be less stable in that setting. A moderated \(F\)-test addresses a joint multi-coefficient hypothesis, while a contrast-specific moderated \(t\)-test reports a directional, one-dimensional effect. A minimum-effect procedure such as TREAT tests against a nonzero threshold rather than zero. These procedures answer different questions; a table should not mix their statistics or describe one test as if it were another.

Moderation does not repair a misspecified mean model, unmodeled sample dependence, poor normalization, or an inappropriate contrast. It also does not make an estimate precise when the data contain little information. Confidence intervals based on the moderated reference distribution depend on the model and variance-prior assumptions, and fold-change intervals obtained by exponentiation inherit those assumptions. Finally, a gene-level table is not evidence of causation: interpretation depends on the design and the scientific context.

Common pitfall: A reader sees a small p-value and writes that the gene has a “large effect.” This confuses evidence against a null with effect magnitude. Report the contrast estimate in log2 units, its moderated standard error or confidence interval, and the adjusted p-value as distinct quantities; discuss biological importance using a justified effect-size criterion.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. A contrast is defined as control minus treatment. What does a negative estimate mean on the log2 expression scale?
  2. For an estimate of \(0.40\) log2 units and a moderated standard error of \(0.20\), calculate the moderated \(t\) statistic.
  3. Why should a table give both a raw p-value and an adjusted p-value when many genes are tested?
  4. What is the approximate expression ratio corresponding to an estimated log2 contrast of \(1\)?
  5. Name two checks that can reveal a reporting or modeling problem before a gene-level table is released.

Solutions. (1) The estimated control expression is lower than treatment expression; the sign follows the stated control-minus-treatment direction. (2) \(t=0.40/0.20=2.00\). The degrees of freedom are also needed to obtain its p-value. (3) The raw p-value is gene-specific, while the adjusted value accounts for the chosen multiple-testing procedure and testing family. (4) \(2^1=2\), so the estimated control-to-treatment expression ratio is 2, assuming the contrast is defined in that order. (5) Examples include confirming that the contrast is estimable and signed as described, checking \(t=\hat{\theta}/SE\), verifying that intervals are centered on estimates, and inspecting residual and variance-prior diagnostics.

Clinical Biostats