Tutorials › Causal Inference › Weight Truncation and Its Bias-Variance Tradeoff

Marginal Structural Models · Tutorial 745 of 972

Weight Truncation and Its Bias-Variance Tradeoff

Compare untruncated and percentile-truncated weights, calculate their effects on estimates and effective sample size, and assess the bias-variance tradeoff.

Advanced 10 min read

What You'll Learn

  • Define percentile truncation for longitudinal treatment and censoring weights
  • Calculate weighted means and treatment contrasts before and after truncation
  • Compute effective sample size and interpret what it does and does not measure
  • Explain how truncation can reduce the influence of extreme weights
  • Distinguish variance reduction from bias introduced by changing weights
  • Identify decisions that should be specified and reported in a truncation analysis

Why Truncate Weights?

In a marginal structural model (MSM), inverse-probability weights give greater influence to observations whose treatment and censoring histories were relatively unlikely given their measured past. This weighting can address treatment-confounder feedback when the causal assumptions and weight models are appropriate. But if some histories are rare, their weights can be very large. A small number of observations may then dominate a weighted estimate, making it highly variable across samples.

Weight truncation limits the largest and, sometimes, the smallest weights. It can reduce the influence of extreme observations, but it also changes the weights used to construct the weighted population. Therefore, truncation is a bias-variance tradeoff, not a correction that automatically improves an analysis. The rule should be chosen in advance, reported clearly, and evaluated alongside the untruncated analysis.

Definition and Estimand

Definition: Let \(W_i\) be the analysis weight for individual \(i\), such as a combined longitudinal treatment and censoring weight. For lower and upper limits \(L\) and \(U\), truncation replaces that weight by $$ W_i^{T}=\min\{U,\max(L,W_i)\}. $$ Weights below \(L\) are raised to \(L\), weights above \(U\) are lowered to \(U\), and weights between the limits are unchanged. In percentile truncation, \(L\) and \(U\) are specified percentiles of a defined weight distribution.

A truncation rule needs more detail than “trim extreme weights.” It should identify the percentiles, the distribution from which the limits are calculated, the quantile convention, and which weights are truncated. For longitudinal analyses, the rule might apply to the final product of treatment and censoring weights for each individual. Truncating each component separately is a different procedure and can produce different final weights. If the data contain repeated records per individual, the analysis must also state whether the rule is applied to individual-level weights or to a different analysis unit.

For a weighted mean of an outcome \(Y_i\), the untruncated and truncated estimates are

$$ \hat{\mu}_{W}=\frac{\sum_{i=1}^{n}W_iY_i}{\sum_{i=1}^{n}W_i}, \qquad \hat{\mu}_{T}=\frac{\sum_{i=1}^{n}W_i^{T}Y_i}{\sum_{i=1}^{n}W_i^{T}}. $$

In an MSM, weighted estimating equations are used to estimate model parameters rather than only a weighted mean. The same central comparison applies: truncation changes the weights entering those equations. For a treatment contrast, one may compare weighted outcome estimates under the relevant treatment strategies. The examples below use weighted means and mean differences to make the arithmetic transparent; they are illustrations, not real studies.

The causal interpretation of an untruncated weighted estimate relies on assumptions such as consistency, sequential exchangeability, positivity, and correctly specified treatment and censoring weight models. Truncation does not establish these assumptions. In particular, it cannot create support for treatment histories that are absent or nearly absent in the data.

Effective Sample Size as a Weight Diagnostic

The effective sample size (ESS) summarizes how concentrated a set of nonnegative weights is:

$$ ESS=\frac{\left(\sum_{i=1}^{n}W_i\right)^2}{\sum_{i=1}^{n}W_i^2}. $$

If all \(n\) weights are equal and positive, \(ESS=n\). If one or a few weights dominate, ESS can be much smaller than \(n\). Multiplying every weight by the same positive constant leaves both the weighted mean and ESS unchanged. ESS is a diagnostic of weight concentration, not a literal count of independent observations and not, by itself, a standard error or a guarantee of adequate information for every model parameter.

Worked Example: A Single Extreme Weight

Suppose ten hypothetical individuals have weights \(1,1,1,1,1,1,1,1,1,10\). The first nine have outcome \(Y=0\), and the last has \(Y=1\). Use a prespecified upper truncation limit at the 90th percentile, calculated by the nearest-rank convention: sort the weights and select the observation at rank \(\lceil 0.90n\rceil\).

Here \(\lceil 0.90(10)\rceil=9\), so the 90th-percentile limit is 1. Truncation therefore replaces the weight 10 by 1; all ten truncated weights equal 1.

The untruncated weighted mean is

$$ \hat{\mu}_{W} =\frac{9(1)(0)+(10)(1)}{9(1)+10} =\frac{10}{19} =0.5263. $$

After truncation,

$$ \hat{\mu}_{T} =\frac{9(1)(0)+(1)(1)}{10(1)} =\frac{1}{10} =0.1000. $$

The untruncated ESS is

$$ ESS_W=\frac{19^2}{9(1^2)+10^2} =\frac{361}{109} =3.312, $$

whereas the truncated ESS is \(ESS_T=10^2/10=10\). In this example, one observation with outcome 1 contributes more than half of the total untruncated weight, and the weighted mean is consequently much higher than the truncated mean. The difference is not evidence that either value is automatically correct: it shows that the estimate is sensitive to the treatment of the extreme weight.

Changes to a Weighted Treatment Contrast

Truncation can change a contrast as well as each weighted mean. Consider a common upper limit applied to the weights in both treatment groups. Using a common rule makes the comparison explicit; applying separate limits by group would define another analysis and should be stated as such.

Worked Example: A Two-Group Contrast

In a hypothetical data set, four individuals in each of two treatment groups have weights \(1,1,2,8\). Their outcomes are \(0,0,1,1\) in the first group and \(0,0,0,1\) in the second. Across all eight weights, use the prespecified 75th-percentile upper limit with the nearest-rank convention. The sorted pooled weights are \(1,1,1,1,2,2,8,8\); rank \(\lceil0.75(8)\rceil=6\) gives a limit of 2.

For the first group, the untruncated weighted mean is

$$ \hat{\mu}_{1,W} =\frac{1(0)+1(0)+2(1)+8(1)}{1+1+2+8} =\frac{10}{12} =0.8333. $$

For the second group, it is

$$ \hat{\mu}_{0,W} =\frac{1(0)+1(0)+2(0)+8(1)}{1+1+2+8} =\frac{8}{12} =0.6667. $$

The untruncated weighted difference, first group minus second group, is \(0.8333-0.6667=0.1667\). Capping weights at 2 gives weights \(1,1,2,2\) in each group. The truncated means are

$$ \hat{\mu}_{1,T}=\frac{2+2}{1+1+2+2}=\frac{4}{6}=0.6667, \qquad \hat{\mu}_{0,T}=\frac{2}{6}=0.3333. $$

The truncated difference is \(0.6667-0.3333=0.3333\). For either group, the untruncated ESS is

$$ ESS_W=\frac{12^2}{1^2+1^2+2^2+8^2} =\frac{144}{70} =2.057, $$

and the truncated ESS is

$$ ESS_T=\frac{6^2}{1^2+1^2+2^2+2^2} =\frac{36}{10} =3.600. $$

The larger ESS indicates less concentration in the truncated weights. It does not establish that the truncated contrast is less biased or that its sampling variance is lower in this particular data set.

Why Variance May Fall—and Bias May Rise

The variance intuition can be seen in a simplified weighted-mean calculation. Suppose the weights are treated as fixed and the outcomes have conditional means \(\mu_i\), variances \(\sigma_i^2\), and are independent across individuals. The weighted mean has conditional variance

$$ \operatorname{Var}(\hat{\mu}_{W}\mid W) =\frac{\sum_{i=1}^{n}W_i^2\sigma_i^2}{\left(\sum_{i=1}^{n}W_i\right)^2}. $$

This follows because the denominator is fixed conditional on the weights, and independence makes the variance of the weighted sum equal to the sum of the squared weights times the outcome variances. A very large \(W_i\) can contribute substantially through \(W_i^2\). Capping it can therefore reduce this variance contribution. In a real weighted MSM, however, weights are estimated, outcomes need not have equal variances, and model parameters are usually estimated by weighted estimating equations. The simplified expression explains a possible mechanism; it is not a general variance formula for every MSM estimator.

There is a corresponding bias concern. Under appropriate causal assumptions, the intended weighting scheme creates a weighted distribution in which treatment assignment is independent of measured past confounders, in the required sense. Replacing some weights with caps generally changes that distribution. It may leave some imbalance, so the truncated estimator can be biased for the original causal target even when the untruncated weighting procedure would be unbiased under its assumptions. In repeated samples, mean squared error relative to that target decomposes as

$$ MSE(\hat{\theta})=\operatorname{Var}(\hat{\theta}) +\left\{\operatorname{Bias}(\hat{\theta})\right\}^{2}. $$

Thus, a truncated estimate can have lower variance and higher bias. Whether its mean squared error is lower depends on both changes. Neither a higher ESS nor a more stable-looking estimate settles that question. If truncation is applied at a fixed percentile, the threshold can continue to affect a nonzero portion of the weight distribution as the sample grows; it need not become irrelevant in large samples.

Worked Example: Truncating a Product of Longitudinal Weights

Consider four hypothetical individuals with treatment-weight and censoring-weight components \((1,1)\), \((1.5,2)\), \((2,3)\), and \((1,10)\). Their final product weights are \(1,3,6,10\), and their outcomes are \(0,0,1,1\). Use the 75th percentile of the four final product weights as the upper limit, with the nearest-rank convention. The sorted weights are \(1,3,6,10\), so rank \(\lceil0.75(4)\rceil=3\) gives a limit of 6.

Using the product weights without truncation gives

$$ \hat{\mu}_{W} =\frac{1(0)+3(0)+6(1)+10(1)}{1+3+6+10} =\frac{16}{20} =0.8000. $$

Capping the weight 10 at 6 gives truncated weights \(1,3,6,6\), so

$$ \hat{\mu}_{T} =\frac{1(0)+3(0)+6(1)+6(1)}{1+3+6+6} =\frac{12}{16} =0.7500. $$

The corresponding ESS values are

$$ ESS_W=\frac{20^2}{1^2+3^2+6^2+10^2} =\frac{400}{146} =2.740, \qquad ESS_T=\frac{16^2}{1^2+3^2+6^2+6^2} =\frac{256}{82} =3.122. $$

The example shows why the truncation unit matters: the final weight is a product, and one large component can make that product influential. Capping the final product changes the weighted mean and increases the ESS here. Capping the component weights first would generally produce a different set of final weights and is not equivalent.

Choosing and Reporting a Truncation Rule

A defensible analysis treats truncation as a prespecified sensitivity choice, not as an opportunity to select whichever estimate is most appealing. A practical sequence is:

1
Define the weights and analysis unit.
State whether the weights are stabilized, whether treatment and censoring weights are combined, and the unit to which each final weight applies.
2
Specify the rule.
State the lower and upper percentiles, the distribution used to calculate them, the quantile convention, and whether limits are common or group-specific.
3
Compare results.
Report the untruncated and truncated estimates, the truncation limits, and relevant weight diagnostics such as the ESS. Describe changes in the estimate in the outcome’s units or on its model scale.
4
Interpret cautiously.
Explain that truncation can reduce the influence of extreme weights but may change the weighted target or leave residual imbalance. Do not treat it as a remedy for lack of positivity or an incorrect weight model.

A common mistake is to argue, “The truncated estimate is more plausible and the ESS is larger, so truncation removed bias.” The reasoning fails because ESS measures weight concentration, not bias, and plausibility is not a diagnostic of causal identification. The correction is to present truncation as a sensitivity analysis: show how the estimate responds to a justified prespecified rule, assess the relevant balance and positivity diagnostics, and retain the untruncated result for comparison. If conclusions depend strongly on the rule, that sensitivity is itself important evidence about the analysis.

Key takeaway: Percentile truncation caps extreme weights and can make weighted estimates less dominated by a few individuals. It may reduce variance, but it changes the weighting scheme and can introduce bias for the target causal effect. Report the rule, estimate changes, and ESS together; none of these quantities alone establishes that truncation improves causal validity.

Check Your Understanding

Use these questions to check whether you can distinguish the mechanical effect of truncation from its causal interpretation.

  1. If every weight is multiplied by the same positive constant, what happens to a weighted mean and to the ESS? Explain using their formulas.
  2. Why can capping a very large weight reduce a variance contribution even though it may change the weighted estimate?
  3. For longitudinal data, why is truncating the final product weight not generally equivalent to truncating each component weight separately?
  4. What does an increase in ESS after truncation tell you, and what does it not tell you?
  5. Name at least three details that should be stated when reporting percentile truncation.
Clinical Biostats