thebench.bio #1 Ecosystem for the Bio-Tech Industry
All Statistics questions

Question 18 of 20 Intermediate Practical

When should you log-transform skewed assay data, and how do you report the result?

Short answer

Log-transform when the data are roughly log-normal, typically positive values whose spread grows with their level. Analyze on the log scale, then back-transform: a mean of logs becomes a geometric mean and a difference of logs becomes a ratio, such as a 1.5-fold change.

Why

Many assay readouts behave multiplicatively. A treatment that raises a cytokine by half does so whether the baseline is 10 or 100, and replicate spread grows with the level. Taking logs turns ratios into differences and often makes the spread similar across groups, so t-tests and linear models fit better.

Feng and colleagues point out the limits. The transform helps only if the data are close to log-normal, it can make some skewed data more skewed, and back-transforming the mean of logs does not give the arithmetic mean of the original data. Zeros are a further problem, because adding an arbitrary constant before taking logs can change the conclusions.

How to work it through

  1. Plot the raw data by group and check whether spread grows with the mean.
  2. Confirm all values are positive and decide in advance how to handle zeros or values below the detection limit.
  3. Take natural or base-2 logs and recheck the plots on the log scale.
  4. Fit the planned test or model on the log values.
  5. Back-transform the group means to geometric means and the difference and its confidence interval to a ratio.
  6. Report the ratio with its interval and state that the analysis used log-transformed data.

An example

IL-6 in two groups of 12 donors ranges from 3 to 240 pg per mL, with the treated group far more variable. On the natural-log scale the spreads are similar. Mean logs are 2.48 and 2.89, a difference of 0.41.

Back-transformed, the geometric means are about 12 and 18 pg per mL and the ratio is exp(0.41), about 1.5. The 95 percent interval for the difference of logs, 0.05 to 0.77, becomes a ratio interval of 1.05 to 2.16. The report says treatment was associated with a 1.5-fold higher geometric mean IL-6.

Where the answer stops holding

A geometric mean is not the arithmetic mean, so totals or budgets cannot be computed from it. Values at zero or below the detection limit need a censored-data method rather than an arbitrary added constant. If the log scale does not equalize spread, a different transform, a generalized linear model or a rank-based method may suit better.

Transforming after looking at p-values from several scales is a form of selective analysis.

A strong answer covers

  • Suited to positive, multiplicative, log-normal data
  • Check that spread grows with level
  • Back-transform to geometric means and ratios
  • Handle zeros without an arbitrary constant
  • Prespecify the scale

Common mistakes

  • Back-transforming the mean of logs and calling it the mean concentration
  • Adding 1 to every value before logging without checking how it changes the result
  • Trying several transformations and reporting the one with the smallest p-value