Why Model the Log of an Expected Count?
RNA-seq records nonnegative integer counts, but the scientific question is often about how the expected count for a gene changes with a condition or another predictor. A model for that expectation must respect its positive scale: an expected count cannot be negative. A log link does this while allowing predictors to enter additively. The resulting model is especially useful because an additive change on the log scale becomes a multiplicative change on the count scale.
The response remains the count itself. The model does not require taking the logarithm of every observed count, and it does not claim that an observed count equals its expected value. For a given gene, observed counts vary around their conditional mean. Earlier material on the negative binomial count model describes a distribution that can represent this variation, including overdispersion relative to the Poisson model.
For a single quantitative predictor \(x_i\), a simple specification is
Here \(\beta_{0g}\) is the log expected count when \(x_i=0\), and \(\beta_{1g}\) is the change in log expected count for a one-unit increase in \(x_i\). The gene subscript allows the coefficients to differ by gene. Exponentiating both sides gives
Thus \(\exp(\beta_{0g})\) is the expected count at \(x_i=0\), and \(\exp(\beta_{1g})\) is a ratio of expected counts for a one-unit increase in \(x_i\), with the model's other predictors held fixed. A coefficient is not itself a count-scale difference. Its exponential is a multiplicative factor; the corresponding percentage change is \(100\{\exp(\beta_{1g})-1\}\%\).
From a Coefficient to a Count Ratio
The interpretation follows directly by comparing two predictor values. For values \(x\) and \(x+1\), the model gives
The baseline term and the part involving \(x\) cancel. This is why the multiplicative factor does not depend on the starting value of \(x\) in this model. The absolute change does depend on that starting value: multiplying an expected count of 10 by 1.5 adds 5, whereas multiplying an expected count of 100 by 1.5 adds 50.
The model and interpretation require care. The conditional mean must be positive, and the chosen additive predictor expression must be a reasonable description of how the log mean varies with the included predictors. A one-unit interpretation also depends on the predictor's unit and coding. If \(x\) is measured in years, one unit means one year; if it is recorded in five-year units, one unit means five years. The zero point determines the intercept's interpretation and may not be scientifically meaningful unless the predictor has been centered or zero is a relevant value.
Worked Example: A Binary Condition Multiplies the Expected Count
Suppose a hypothetical model for one gene uses a condition indicator \(x_i\), coded 0 for the reference condition and 1 for the comparison condition: $$ \log(\mu_{gi})=\beta_{0g}+\beta_{1g}x_i. $$ Suppose the fitted coefficients are \(\beta_{0g}=\log(40)\) and \(\beta_{1g}=\log(1.50)\). Interpret the model's expected counts.
For the reference condition, \(x_i=0\), so $$ \mu_g(0)=\exp\{\log(40)+\log(1.50)(0)\}=40. $$ The model-implied expected count is 40 counts for the reference condition.
For the comparison condition, \(x_i=1\), so $$ \mu_g(1)=\exp\{\log(40)+\log(1.50)\} =40(1.50)=60. $$ The expected count is 60 counts. The expected-count ratio is \(60/40=1.50\), so the comparison condition has a model-implied expected count 1.50 times that of the reference condition, or 50% higher. This is an interpretation of the model means, not a claim that every comparison-condition sample will have exactly 60 observed counts.
Quantitative Predictors and Predictor Units
For a quantitative predictor, a coefficient describes a one-unit change on its recorded scale. If changes of one recorded unit are too small or awkward to interpret, rescaling the predictor can make the coefficient more useful. Rescaling changes the numerical coefficient but not the fitted mean for a given underlying predictor value, provided the coefficient is transformed consistently.
Worked Example: Interpreting a Predictor Measured in Five-Unit Increments
For a hypothetical gene, let \(d_i\) be dose in milligrams and define \(x_i=d_i/5\), so a one-unit increase in \(x_i\) corresponds to an increase of 5 mg. Suppose $$ \log(\mu_{gi})=\log(200)-0.12x_i. $$ Find the expected count at 10 mg and at 15 mg, and interpret the change.
At 10 mg, \(x_i=10/5=2\), giving $$ \mu_g(10)=\exp\{\log(200)-0.12(2)\} =200\exp(-0.24) \approx 200(0.7866)=157.3. $$ At 15 mg, \(x_i=15/5=3\), giving $$ \mu_g(15)=\exp\{\log(200)-0.12(3)\} =200\exp(-0.36) \approx 200(0.6977)=139.5. $$ The ratio for a 5 mg increase is $$ \frac{\mu_g(15)}{\mu_g(10)}=\exp(-0.12)\approx0.8869. $$ Thus, for each 5 mg increase, the model implies an expected count multiplied by about 0.887, a decrease of about \(100(1-0.8869)=11.31\%\). The decrease in counts is not a fixed number: here the expected count falls by about \(157.3-139.5=17.8\) counts over this particular interval.
A log-linked model can include several predictors by adding their contributions to the log mean. For example, a condition indicator and a quantitative covariate might give
A one-unit increase in \(x_i\) multiplies the expected count by \(\exp(\beta_{1g})\) when \(z_i\) is held fixed. This is an adjusted, conditional interpretation: the comparison is between samples with the same value of \(z_i\), according to this model. It is not automatically a causal effect. If the model needs an interaction, the multiplier for \(x_i\) can depend on \(z_i\), so the simple constant-ratio interpretation no longer applies across all values of \(z_i\).
Worked Example: Interpreting Two Predictors Together
Consider a hypothetical model for one gene, where \(x_i=1\) denotes a comparison condition and \(x_i=0\) denotes its reference; \(z_i\) is age in years centered at 50: $$ \log(\mu_{gi})=\log(30)+\log(1.40)x_i+0.08z_i. $$ Find the model-implied expected count for a comparison-condition sample aged 53, and compare it with the expected count for a reference-condition sample of the same age.
For age 53, the centered covariate is \(z_i=53-50=3\). For the comparison condition, \(x_i=1\): $$ \mu_g=\exp\{\log(30)+\log(1.40)(1)+0.08(3)\} =30(1.40)\exp(0.24) \approx42(1.27125)=53.39. $$ The expected count is about 53.4 counts. For the reference condition at the same age, \(x_i=0\): $$ \mu_g=\exp\{\log(30)+0+0.08(3)\} =30\exp(0.24)\approx38.14. $$ Their ratio is \(53.39/38.13\approx1.40\). At a fixed age, the condition coefficient implies a 1.40-fold expected count, or a 40% higher model-implied mean for the comparison condition. The age coefficient separately implies a factor of \(\exp(0.08)\approx1.083\) per additional year, holding condition fixed.
Mean Structure and Count Variation
A log link specifies the mean; it does not by itself specify the full probability distribution of the counts. In a negative binomial model, one possible conditional specification is \(Y_{gi}\mid x_i\sim NB(\mu_{gi},\alpha_g)\), using the mean-dispersion parameterization in which
The log-linked equation supplies \(\mu_{gi}\); the dispersion parameter governs conditional variability around that mean. For \(\alpha_g=0\), the variance reduces to the Poisson variance \(\mu_{gi}\). For positive \(\alpha_g\), the variance exceeds the mean. The log link is compatible with either count distribution, but choosing a mean structure does not establish that the distributional assumptions are appropriate.
Diagnostics, Alternatives, and Limitations
A fitted log-linked mean should be checked against the study design and the observed counts. Useful warning signs include a systematic pattern in residuals across predictor values, groups, or fitted means; a relationship that visibly bends when the model assumes a straight line on the log-mean scale; and a small number of influential samples that substantially change fitted coefficients. A coefficient with a surprising sign can also signal reversed indicator coding, a misunderstood predictor unit, or a predictor relationship that the model does not capture. Diagnostics do not prove a model correct, but they can reveal failures of its assumptions.
The log link is a standard choice for positive count means, but it is not the only possible link. An identity link would make the expected count additive in predictors, which may be scientifically suitable in some settings, but it can imply negative means for some predictor values. A log link guarantees positive means and gives multiplicative interpretations. A Poisson model and a negative binomial model can share the same log-linked mean structure while making different assumptions about count variability. Choosing the link and choosing the count distribution are therefore distinct decisions.
A particularly important limitation in RNA-seq is that samples can have different sequencing depths. A mean model that ignores differences in sampling depth may attribute technical differences in observed counts to the biological predictors. The log-linked equation above describes a predictor-based mean but does not, by itself, adjust for library size. Library-size offsets and normalization are treated separately. The coefficient interpretations here are conditional on the specified mean model and any adjustments it includes; they should not be read as biological effects without considering design, measurement, and possible confounding.
Common Mistakes
- Interpreting \(\beta_{1g}\) as a count difference. It is a change in log expected count. The one-unit count ratio is \(\exp(\beta_{1g})\).
- Taking the logarithm of observed counts and treating that as the model. The log link applies to the conditional expected count; the observed response remains an integer count with a distribution around that mean.
- Ignoring predictor units. A coefficient per milligram differs numerically from one per five milligrams. State what a one-unit change means before interpreting it.
- Claiming that every count is multiplied by the coefficient's exponential. The factor compares expected counts under the model, not individual observed counts, which remain variable.
- Assuming a log link resolves all RNA-seq issues. It ensures a positive modeled mean, but does not automatically account for sampling depth, overdispersion, dependence, or a misspecified predictor relationship.
Check Your Understanding
Answer each question, then compare with the solutions below.
- A model is \(\log(\mu_i)=\log(25)+0.20x_i\). What is the expected-count ratio for a one-unit increase in \(x_i\), and what is the percentage change?
- A predictor is recorded in ten-day units and has coefficient \(-0.05\). What multiplier applies to a 30-day increase?
- Why does a log link ensure a positive modeled mean, and why does that not mean every observed count is positive?
- In a model with condition and age predictors, what does it mean to interpret the condition coefficient holding age fixed?
Solutions. (1) The multiplier is \(\exp(0.20)\approx1.221\), so the expected count is about 22.1% higher per one-unit increase. (2) Thirty days is three units, so the multiplier is \(\exp\{(-0.05)(3)\}=\exp(-0.15)\approx0.8607\), about a 13.93% reduction in expected count. (3) The model sets \(\mu_i=\exp(\eta_i)\), and an exponential is always positive. An observed count is a random outcome around that mean and can be zero. (4) It compares the model-implied expected counts across conditions at the same age; the interpretation is conditional on the model and is not, by itself, a causal claim.