From a Log-Scale Contrast to a Fold Change
In differential expression analysis, a fitted condition coefficient is often reported on a logarithmic scale, while biological summaries are often phrased as a fold change. The conversion is simple, but interpreting it correctly requires tracking the contrast direction: a coefficient for A relative to B describes A divided by B, not B divided by A. Its sign indicates which condition has the larger fitted expected expression, while its absolute size determines how far the ratio is from one.
The interpretation also depends on the model. With a log link, a condition contrast is a difference between log expected counts; exponentiating that difference gives a ratio of expected counts. When the model includes an offset for library size, this ratio compares expected expression adjusted for the offsets, rather than raw observed counts. If other covariates are included, it is a comparison at the same values of those covariates.
Why Exponentiation Gives a Ratio
Suppose the fitted expected count for sample \(j\) and a particular gene is \(\mu_j\), and the model uses a known offset \(o_j\), such as the logarithm of a library-size adjustment. In a two-condition model with a log link, one possible form is \(\log(\mu_j)=o_j+\beta_0+\beta_A I(A_j)\), where \(I(A_j)\) equals one for condition A and zero for reference condition B. The coefficients describe expected counts through their logarithms; they are not themselves fold changes.
To compare conditions at the same offset, subtract the two fitted log means. The shared terms cancel, leaving the condition contrast. Exponentiation then converts a difference of logarithms into a ratio:
This identity is the key justification. It assumes the fitted model uses a log link and that the comparison holds other terms, including covariate values and offsets, fixed. If the model has multiple conditions or a different coding scheme, first calculate the requested contrast from the coefficients; then exponentiate that contrast. A single coefficient is not necessarily the desired comparison.
A positive contrast gives a fold change greater than one, so fitted expression is higher in the numerator condition. A negative contrast gives a fold change between zero and one, so fitted expression is lower in that condition. A contrast of zero corresponds to a fold change of one. Importantly, the sign is not the direction of a change over time unless the conditions and their order actually represent that comparison.
Worked Example: A Lower Fitted Expression in A Than B
Suppose a hypothetical fitted model gives the natural-log contrast \(\widehat{\beta}_{A/B}=-1.099\) for one gene. Interpret the estimated fold change, its reverse comparison, and the percentage decrease from B to A.
Fold change A relative to B. Exponentiate the contrast:
The estimated offset-adjusted expected expression in A is about 0.3332 times that in B, at the same covariate values. Because the ratio is below one, the direction is lower expression in A.
Reverse comparison. Reverse the contrast before exponentiating, or take the reciprocal of the unrounded ratio:
The estimated expression in B is about 3.001 times that in A. The two descriptions are equivalent; they use opposite numerator and denominator.
Percentage decrease from B to A. Calculate the decrease relative to B, using the unrounded ratio:
Thus the fitted expected expression in A is about 66.68% lower than in B. This is not a 66.68% increase in the reverse direction: percentage changes depend on which condition is the reference.
Natural Logs, Log2 Fold Changes, and Percent Changes
The log link in a generalized linear model conventionally uses the natural logarithm, so its coefficient converts to a ratio with the exponential function. Some expression summaries instead use log2 fold change. These are two scales for the same contrast: divide a natural-log contrast by \(\ln(2)\) to obtain a log2 fold change, or raise 2 to a log2 fold change to obtain the ratio. Check which scale a reported coefficient uses before converting it.
A fold change of 1.5 means the numerator condition has 50% higher fitted expression than the denominator condition. A fold change of 0.5 means it has 50% as much expression, or 50% lower expression. Ratios above one and below one are not symmetric on the ordinary ratio scale: a two-fold increase has a reverse ratio of one-half, not a decrease of two units. Log contrasts, by contrast, reverse sign exactly when the comparison is reversed.
Worked Example: Converting a Contrast to a Log2 Fold Change
For a hypothetical gene, suppose the fitted natural-log contrast for condition A relative to B is \(0.4055\). Find the fold change, its log2 version, and the percent increase.
First exponentiate the natural-log contrast:
The fitted expected expression in A is about 1.500 times that in B, so A is higher. Convert to the log2 scale:
Checking in the other direction, \(2^{0.5850}\approx 1.500\), up to rounding. The percentage increase relative to B is \(100\{1.50005-1\}\%\approx 50.005\%\), or about 50.01%. The percentage is calculated relative to B, the denominator condition.
Uncertainty on Both Scales
An estimated contrast is uncertain, and an interval for that contrast can be reported on the log scale or transformed to the fold-change scale. If a suitable approximate confidence interval for a contrast is \([L,U]\), then the corresponding fold-change interval is \([\exp(L),\exp(U)]\). Because the exponential function is strictly increasing, the lower endpoint remains the lower endpoint. The transformed interval is generally asymmetric around the estimated fold change.
For example, an approximate interval for a log contrast might be formed as estimate plus or minus 1.96 standard errors when a normal approximation is appropriate. In a multi-coefficient contrast, its standard error must account for coefficient covariance: for contrast vector \(c\) and estimated coefficient covariance matrix \(\widehat{V}\), the standard error is \(\sqrt{c^\mathsf{T}\widehat{V}c}\). The interval procedure and its approximation need to be appropriate for the fitted model; exponentiation changes the scale, not the underlying uncertainty.
Worked Example: Transforming an Approximate Interval
Suppose a hypothetical fitted natural-log contrast is \(0.4055\), with standard error \(0.1800\). For illustration, assume a normal approximation is suitable and use the approximate interval estimate \(\pm 1.96SE\). Transform the resulting interval to the fold-change scale.
The margin of error on the log scale is \(1.96(0.1800)=0.3528\). Thus the approximate interval for the contrast is
Exponentiate both endpoints, without rounding them first:
On this approximate interval, the fold change for A relative to B ranges from about 1.054 to 2.135. It is not an interval symmetric around the point estimate of 1.500. Under the procedure's repeated-sampling assumptions, the interval procedure is designed to cover the true contrast at its stated confidence level; it does not assign a probability to the fixed parameter being inside this particular interval. Here the entire interval is above one, corresponding to positive log contrasts. This statement describes the interval, not a separate hypothesis test.
Contrasts, Covariates, and Practical Checks
For a model with several conditions, the requested comparison may involve more than one coefficient. Suppose condition A is the reference, with coefficients \(\beta_B\) and \(\beta_C\) for conditions B and C. The log contrast for C relative to B is \(\beta_C-\beta_B\), not simply \(\beta_C\). Its fold change is \(\exp(\beta_C-\beta_B)\). This is why the comparison direction and the contrast must be written down before interpreting a reported number.
Worked Example: A Multi-Condition Contrast With a Covariate
Consider a hypothetical log-link model with condition A as the reference: \(\log(\mu)=o+\beta_0+\beta_B I(B)+\beta_C I(C)+\gamma z\). Suppose the fitted coefficients are \(\widehat{\beta}_B=0.20\) and \(\widehat{\beta}_C=-0.35\). Interpret condition C relative to B, comparing samples with the same covariate value \(z\) and offset.
The log contrast for C relative to B is \(\widehat{\beta}_C-\widehat{\beta}_B=-0.35-0.20=-0.55\). Exponentiating gives
The fitted expected expression in C is about 0.5770 times that in B at the same \(z\) and offset. The reverse ratio is \(\exp(0.55)\approx 1.733\), so fitted expression in B is about 1.733 times that in C. The estimated decrease from B to C is \(100\{1-\exp(-0.55)\}\%\approx 42.31\%\). These are conditional model comparisons; they do not imply that changing condition alone causes an expression change.
Before reporting a fold change, check the following:
- Contrast order: write the numerator and denominator explicitly. Reversing them changes \(\beta\) to \(-\beta\) and the fold change to its reciprocal.
- Coefficient scale: confirm whether the estimate is a natural-log contrast or a log2 fold change. Applying the wrong base gives the wrong ratio.
- Model terms: state whether the comparison holds covariates fixed and what offset adjustment is being used. A model-based ratio is not generally a raw-count ratio.
- Precision and fit: an interval can be wide when the contrast is uncertain. Unusual observations, sparse counts, or an inadequate mean model can also make a fitted contrast unreliable; a precise-looking transformed number does not repair those problems.
A useful alternative is to report both the signed log contrast and the fold change. The log contrast makes direction and additive comparisons across coefficients transparent; the fold change often makes relative magnitude easier to communicate. Reporting only a ratio can obscure direction if the conditions are not named, while reporting only the log coefficient can be hard to interpret in expression units.
| Summary | What it communicates | Key interpretation check |
|---|---|---|
| Natural-log contrast \(\beta_{A/B}\) | Signed difference in fitted log expected expression | Positive means A is higher than B |
| Fold change \(\exp(\beta_{A/B})\) | Ratio of fitted expected expression in A to B | Values below one indicate lower expression in A |
| Log2 fold change \(\beta_{A/B}/\ln(2)\) | Same signed comparison on a base-2 log scale | Exponentiate with base 2 to recover the ratio |
| Percent change \(100\{\exp(\beta_{A/B})-1\}\%\) | Relative change from denominator B to numerator A | Name the denominator; reversing the comparison changes the percentage |
Common Mistakes and Limitations
A frequent mistake is to read a negative log contrast as a negative fold change. Fold changes are positive because they are exponentials; a negative contrast instead means the ratio is below one. Another mistake is to state that a coefficient of 0.5 means a 50% increase: on the natural-log scale its ratio is \(\exp(0.5)\approx1.649\), or about a 64.9% increase.
Rounding too early can also produce inconsistent reverse ratios and percentage changes. For example, if a ratio is first rounded to 0.3333, its reciprocal is about 3.0003; that is not the same calculation as taking the reciprocal of an unrounded ratio of \(\exp(-1.099)\), which is about 3.00116. Keep full precision through exponentiation, reciprocation, and percentage calculations, then round the final reported values consistently.
Finally, a fold change is a relative comparison of model-based expected expression, not a difference in raw read counts and not an expression level for an individual sample. It can be strongly affected by the reference condition and by the model's design and assumptions. State the gene, conditions, direction, scale, and relevant adjustment whenever possible. A numerical ratio alone is not a complete interpretation.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- A fitted natural-log contrast for A relative to B is \(-0.6931\). What is the approximate fold change, and which condition has higher fitted expression?
- A log2 fold change for C relative to D is \(1\). What is the fold change? What is the log2 fold change for D relative to C?
- An approximate interval for a natural-log contrast is \([-0.20,0.40]\). What is the transformed fold-change interval, and does it include a ratio of one?
- In a model with A as the reference, the estimated coefficients are \(\widehat{\beta}_B=0.30\) and \(\widehat{\beta}_C=0.10\). Find the estimated fold change for C relative to B.
Solutions. (1) \(\exp(-0.6931)\approx0.5000\). A has about half the fitted expected expression of B, so B is higher. (2) \(2^1=2\), so C has twice the fitted expression of D; reversing the comparison changes the log2 fold change to \(-1\). (3) Exponentiating the endpoints gives \([\exp(-0.20),\exp(0.40)]\approx[0.8187,1.492]\). This interval includes one because the original interval includes zero. (4) The C-versus-B contrast is \(0.10-0.30=-0.20\), so its fold change is \(\exp(-0.20)\approx0.8187\).