Why Inspect Longitudinal Weights on the Log Scale?
A longitudinal weight is built by multiplying contributions across follow-up. Even when each contribution is moderate, their product can become large or small, and the raw weight distribution can be highly skewed. A log transformation expresses that multiplicative construction additively: it lets us see how much each factor contributes to a subject’s final weight and makes broad distributional patterns easier to inspect.
A log-scale display is a diagnostic aid, not a test of whether the causal assumptions or weight models are correct. It can flag unusual products and reveal patterns worth investigating, but it cannot by itself establish exchangeability, positivity, correct model specification, or the validity of a marginal structural model.
The logarithm is defined for strictly positive weights. With estimated probabilities used to form the factors, those probabilities must yield finite, positive ratios for this display to be available. A ratio below one contributes a negative log increment, a ratio of one contributes zero, and a ratio above one contributes a positive increment. Therefore, a negative log weight simply means that the weight is between zero and one; it does not indicate an invalid weight.
What the Log Transformation Reveals
On the raw scale, multiplication can obscure the source of a large product. On the log scale, the total is the sum of signed contributions. Equal multiplicative changes also have equal distances: multiplying a weight by \(c\) adds \(\log(c)\), regardless of the weight’s starting value. For example, moving from 1 to 2 and from 2 to 4 produces the same increase, \(\log(2)\), on the log scale, even though the raw-scale increases are 1 and 2.
A histogram or dot plot of \(Z_i\) can show whether log weights are spread broadly, clustered, or separated into an unusual tail. A boxplot can summarize the middle and flag points far from it. Labelling points by subject or history can help locate records for review. These displays concern the distribution of the final log weights; they do not, by themselves, show which follow-up times produced the pattern.
Justification. The product identity follows from the logarithm rule \(\log(ab)=\log(a)+\log(b)\) for positive \(a,b\), applied repeatedly. For the variance identity, let \(X_t=\log R_{it}\). Finite second moments ensure that the variances and covariances exist. Expanding the centered square gives $$ \operatorname{Var}\left(\sum_{t=0}^{K}X_t\right) =E\left[\left\{\sum_{t=0}^{K}(X_t-E[X_t])\right\}^2\right]. $$ The square contains each \((X_t-E[X_t])^2\) once and each cross-product twice. Taking expectations yields the stated sum of variances and twice the sum of pairwise covariances. Independence makes each cross-covariance zero. In applications, increments from different times need not be independent, so simply adding their variances may be incorrect. \(\square\)
Worked Example: Locating a Large Multiplicative Contribution
A subject’s four successive weight ratios are \(1.1,\ 0.9,\ 1.2,\) and \(3.0\). Find the final weight and its log weight, then assess which factor contributes most on the log scale.
The product is $$ W=1.1(0.9)(1.2)(3.0)=3.564. $$ Taking natural logs of the individual factors gives approximately \(0.09531,\ -0.10536,\ 0.18232,\) and \(1.09861\). The first three exact log increments sum to $$ \log(1.1)+\log(0.9)+\log(1.2)=\log(1.188)\approx 0.1723. $$ The full log weight is $$ \log(3.564)\approx 1.2709. $$
The last ratio contributes \(\log(3.0)\approx1.0986\), far more than the first three factors combined. It is therefore the main arithmetic contributor to this subject’s log weight. This does not establish why the ratio is large or whether its underlying model is wrong; it identifies a contribution to trace back through the fitted weight construction.
Reading Shape, Spread, and Unusual Histories
A right-skewed raw-weight distribution often becomes more compact after taking logs, because a large product is represented by a sum rather than by an extreme value on the original scale. A log-weight histogram may still be asymmetric or have a separated tail. Such features are informative: they indicate that some histories have products unlike the bulk of the data. They are not, on their own, evidence that a specific assumption has failed.
A useful companion summary is the relation between the geometric and arithmetic means. For positive observed weights \(W_1,\ldots,W_n\), the geometric mean is \(\exp\{n^{-1}\sum_i\log W_i\}\). It is no greater than the arithmetic mean. To see this, put \(G=\exp\{n^{-1}\sum_i\log W_i\}\), so that \(\sum_i\log(W_i/G)=0\). Since \(\log x\leq x-1\) for \(x>0\), $$ 0=\sum_{i=1}^{n}\log(W_i/G)\leq \sum_{i=1}^{n}(W_i/G-1). $$ Rearranging gives \(G\leq n^{-1}\sum_i W_i\). The inequality helps explain why a few high weights can pull up the raw mean relative to the geometric mean; the log display makes the multiplicative spread easier to see, but does not replace raw-scale summaries.
Worked Example: Comparing Equal Multiplicative Steps
Consider the positive weights \(0.5,\ 1,\ 2,\) and \(4\). Their natural log weights are approximately \(-0.6931,\ 0,\ 0.6931,\) and \(1.3863\), respectively. The equal steps from \(1\) to \(2\) and \(2\) to \(4\) each add \(\log(2)\approx0.6931\) on the log scale.
The arithmetic mean is $$ \frac{0.5+1+2+4}{4}=\frac{7.5}{4}=1.875. $$ The product is \(0.5(1)(2)(4)=4\), so the geometric mean is \(4^{1/4}=\sqrt{2}\approx1.4142\). Equivalently, the average log weight is \(\log(\sqrt{2})\approx0.3466\). The arithmetic mean exceeds the geometric mean, as expected. The display would show the equal multiplicative steps as equally spaced points, while the raw values are not equally spaced.
Worked Example: Using Labels to Flag Histories for Review
Suppose four subjects have the following three successive ratios:
| Subject | Ratios | Weight \(W_i\) | Log weight \(Z_i\) |
|---|---|---|---|
| A | 1.5, 1.2, 1.0 | 1.800 | 0.5878 |
| B | 0.8, 1.0, 1.25 | 1.000 | 0.0000 |
| C | 1.0, 1.0, 3.0 | 3.000 | 1.0986 |
| D | 1.1, 0.9, 1.2 | 1.188 | 0.1723 |
For example, subject A has \(W_A=1.5(1.2)(1.0)=1.8\) and \(Z_A=\log(1.8)\approx0.5878\). Subject D has \(W_D=1.1(0.9)(1.2)=1.188\) and \(Z_D=\log(1.188)\approx0.1723\). Subject C has \(W_C=3\) and \(Z_C=\log(3)\approx1.0986\), the largest log weight among these four. In a labelled dot plot, C would stand out above the other three.
The ratios show that C’s final factor is 3, while its first two are 1. This points to a specific contribution to inspect in the fitted models and data for that history. It does not show that C’s outcome is influential, nor does the log-weight plot alone quantify the effect of C on an estimate. Those are different questions.
Practical Plotting and Failure Modes
For a basic diagnostic, calculate each positive final weight, transform it using the natural logarithm, and display the resulting values with a histogram, dot plot, or boxplot. Label a small number of unusual observations when feasible. If a display is centered by subtracting the sample mean log weight, state that choice: centering shifts all plotted values by the same amount but leaves their spread and ordering unchanged. It does not change the underlying weights.
When the log-weight distribution shows an isolated point or a broad tail, follow the signal back to the data and the fitted numerator and denominator models. Check coding, time ordering, model inputs, and the estimated probabilities used in the ratios. Compare the raw and log displays: the log plot can clarify structure, while the raw scale retains the actual weight magnitudes. The earlier material on tail quantiles and extreme weight diagnostics gives complementary summaries of the raw distribution.
Confirm that the ratios and products used for the display are finite and strictly positive.
Plot \(Z_i=\log W_i\); negative, zero, and positive values correspond to weights below, equal to, and above one.
Look for broad spread, asymmetry, gaps, or points separated from the main distribution, and identify the corresponding histories.
Trace unusual contributions to their inputs and model components, and use raw-scale summaries and substantive knowledge alongside the plot.
A computational failure can also masquerade as a diagnostic result. Products of many small or large factors can underflow or overflow on a computer. Computing \(\sum_t\log R_{it}\) directly avoids forming the product merely to take its logarithm. A zero or non-finite computed weight should prompt a check of the probabilities, coding, and numerical implementation; it should not be silently passed to a log transformation.
What the Log Plot Does Not Establish
Log-scale diagnostics complement, rather than replace, raw-scale weight summaries. They do not prove that the treatment and censoring models are correctly specified, show that all relevant covariate histories have adequate support, or validate causal identification assumptions. Nor does a compact log-weight distribution prove that the analysis is safe: the display describes estimated weights in the observed sample, not every possible history in the target population.
A common mistake is to treat an extreme log weight as proof of a positivity violation, or to assume that a nearly symmetric log-weight histogram means the models are correct. The correction is to treat the plot as a warning and descriptive check. An unusual point can arise from a rare but valid history, model misspecification, a coding error, or another feature of the data. The plot alone cannot distinguish these explanations. Conversely, a smooth-looking distribution does not guarantee that the weight models or causal assumptions are adequate.
Another mistake is to interpret the numerical distance on the log scale as an additive change in the original weight. A difference of \(\log(2)\) means a multiplicative factor of 2, not a fixed increase of 2 weight units. Keeping that distinction in view is the main interpretive discipline of this diagnostic.
Check Your Understanding
Work through each question, then compare your reasoning with the solutions.
- A subject has two positive ratios, \(0.5\) and \(4\). Find the weight and log weight.
- Why do the steps from weight 1 to 2 and from 2 to 4 have equal length on a natural-log scale?
- If log-weight increments are dependent across time, can the variance of the log weight be found by adding only the increment variances? Explain.
- A labelled log-weight plot has one point well above the rest. State one conclusion it supports and one conclusion it does not support.
Solutions. (1) \(W=0.5(4)=2\), so \(\log W=\log(2)\approx0.6931\). Equivalently, \(\log(0.5)+\log(4)=\log(2)\approx0.6931\); rounding the terms separately before adding can produce a different last decimal. (2) Each step multiplies the weight by 2, so each adds \(\log(2)\) to its log. (3) No. The variance formula includes twice the sum of all pairwise covariances; omitting them is justified only when those covariances are zero. (4) It supports flagging that subject’s history for investigation as having an unusually high log weight relative to the plotted sample. It does not prove model misspecification, a positivity violation, or outcome influence.