Tutorials › Marginal Structural Models › Reading Marginal Weight Distributions

Diagnostics and Sensitivity to Misspecification · Tutorial 245 of 501

Reading Marginal Weight Distributions

Use complementary plots and summaries to describe the shape of estimated inverse probability weights and to interpret those patterns cautiously.

Advanced 12 min read

What You'll Learn

  • Define the empirical distribution of estimated weights at a fixed analysis time.
  • Use histograms, density estimates, and numerical summaries to describe weight shape.
  • Calculate and interpret empirical skewness in a worked example.
  • Distinguish a pooled multimodal distribution from a single skewed distribution.
  • Recognize unusual concentration without treating it as proof of a modeling problem.
  • Identify what weight-distribution plots can and cannot diagnose.

What a Weight Distribution Can Tell You

A marginal weight distribution is a picture of the estimated weights across the analysis units, without first relating those weights to outcomes or covariates. It can quickly reveal whether most weights lie in a narrow range, whether the distribution has a long right tail, or whether several clusters of values are visible. These patterns are useful signals for closer investigation; on their own, they do not identify the cause of a pattern or establish that the causal analysis is valid or invalid.

For a precise description, fix an analysis time and let \(\hat W_i\) be the estimated inverse probability weight for unit \(i\), for \(i=1,\ldots,n\). The distribution considered here is the empirical distribution that assigns probability \(1/n\) to each of the \(n\) observed weights. Thus, each unit contributes one value to the plot and to the summaries. If there are multiple weights per person, such as weights at several times, do not pool them without stating that choice: a pooled plot would combine different time-specific empirical distributions.

Definition: The empirical marginal weight distribution at a fixed analysis time is the distribution that places mass \(1/n\) at each estimated weight \(\hat W_i\). Its mean is \(\bar W=n^{-1}\sum_{i=1}^n \hat W_i\), and its \(r\)th central moment is \(m_r=n^{-1}\sum_{i=1}^n(\hat W_i-\bar W)^r\). When \(m_2>0\), its moment-based skewness is \(g_1=m_3/m_2^{3/2}\).

Weights are normally positive. A histogram displays how many observations fall within each chosen interval; a density plot gives a smoothed view of the same values. The empirical mean, median, standard deviation, and skewness summarize aspects of the distribution that a graph may make visible. The median is the middle observed value (or the average of the two middle values when \(n\) is even). For the empirical variance in this tutorial, use \(m_2\), with divisor \(n\), so it matches the empirical distribution just defined. Statistical software may instead report a sample variance with divisor \(n-1\); check the convention before comparing numbers.

Reading Histograms, Density Plots, and Summaries

A histogram is often a good first display because its bars represent observed counts or proportions, rather than a smoothed estimate. Its appearance depends on the bin width and starting point: a narrow bin can make random gaps look like separate clusters, while a broad bin can merge distinct clusters. A density plot makes overall shape easier to see, but depends on the smoothing bandwidth. A large bandwidth can obscure multiple modes; a small one can produce spurious wiggles.

Read the plot alongside numerical summaries. A mean noticeably larger than the median is consistent with a right-skewed distribution, but it is not by itself a proof of skewness. A positive \(g_1\) indicates that the third central moment is positive; its size is affected by a few large deviations because deviations are cubed. A near-zero \(g_1\) does not rule out multiple modes: a symmetric distribution with two clusters can have zero skewness. Conversely, a right-skewed distribution can have only one mode.

A useful first pass is to note the center, spread, asymmetry, visible modes, gaps, and any unusually tight grouping. These are descriptions, not pass/fail criteria. In particular, the fact that a stabilized-weight distribution is centered near one is a normalization feature, not evidence that the weights are well behaved in every other respect. The earlier material on normalization checks treats that question directly.

Worked Example: A Right-Skewed Empirical Distribution

Suppose eight estimated weights are \(0.5,1,1,1,1,1,1,2.5\). Use bins \([0,0.75)\), \([0.75,1.5)\), and \([1.5,3)\). Describe the distribution and calculate its moment-based skewness.

The bin counts are \(1,6,1\), respectively. The histogram therefore shows a central concentration at 1 and one observation on each side, with the upper observation much farther from the center. The arithmetic mean is \((0.5+6(1)+2.5)/8=9/8=1.125\), while the median is \(1\). Their difference is consistent with a right tail.

For the second central moment, the deviations from the mean are \(-0.625\) once, \(-0.125\) six times, and \(1.375\) once. Hence

$$ m_2=\frac{(-0.625)^2+6(-0.125)^2+(1.375)^2}{8} =\frac{2.375}{8}=0.296875. $$

The third central moment is

$$ m_3=\frac{(-0.625)^3+6(-0.125)^3+(1.375)^3}{8} =\frac{2.34375}{8}=0.29296875. $$

Therefore \(g_1=0.29296875/(0.296875)^{3/2}\approx1.81\), a positive value consistent with substantial right skewness. The plot and summaries agree on asymmetry. This calculation describes these eight weights; it does not reveal whether the pattern arose from a fitted probability model, the observed covariate histories, or another feature of the analysis.

Skewness and Multiple Modes Are Different Features

A mode is a local peak in a distribution's frequency or density. More than one visible peak may arise because the pooled weights combine distinct subpopulations or types of histories, but a plot alone cannot establish that explanation. It may also reflect a small sample, bin choices, or density smoothing. Check whether the apparent modes persist under reasonable alternative bin widths or bandwidths before treating them as a feature worth investigating.

The distinction between asymmetry and multiple modes is formal, not merely visual. The following variance identity shows how separation between groups can create spread in the pooled distribution even when each group is internally concentrated.

Result: Partition the \(n\) weights into groups \(g=1,\ldots,G\), with group size \(n_g\), proportion \(p_g=n_g/n\), mean \(\bar W_g\), and within-group empirical variance \(s_g^2=n_g^{-1}\sum_{i\in g}(\hat W_i-\bar W_g)^2\). Then $$ m_2=\sum_{g=1}^G p_gs_g^2+\sum_{g=1}^G p_g(\bar W_g-\bar W)^2. $$ The pooled variance is the sum of within-group variance and the variance of group means around the pooled mean.

To prove the identity, write each deviation as \(\hat W_i-\bar W=(\hat W_i-\bar W_g)+(\bar W_g-\bar W)\) for an observation in group \(g\). Squaring and summing within that group gives

$$ \sum_{i\in g}(\hat W_i-\bar W)^2 =\sum_{i\in g}(\hat W_i-\bar W_g)^2 +2(\bar W_g-\bar W)\sum_{i\in g}(\hat W_i-\bar W_g) +n_g(\bar W_g-\bar W)^2. $$

The middle term is zero because \(\sum_{i\in g}(\hat W_i-\bar W_g)=0\). Sum over groups and divide by \(n\). The first terms become \(\sum_g p_gs_g^2\), and the last terms become \(\sum_g p_g(\bar W_g-\bar W)^2\), proving the identity. It explains pooled spread, not the cause of any visible modes. \(\square\)

Worked Example: Two Clusters and a Pooled Distribution

Consider the six weights \(0.7,0.8,0.9,1.7,1.8,1.9\). Using bins \([0.6,1.1)\), \([1.1,1.6)\), and \([1.6,2.1]\), the counts are \(3,0,3\). The empty middle bin makes two separated clusters apparent for these particular bin boundaries.

The overall mean is \((0.7+0.8+0.9+1.7+1.8+1.9)/6=7.8/6=1.3\). The deviations are \(-0.6,-0.5,-0.4,0.4,0.5,0.6\), so the empirical variance is \((0.36+0.25+0.16+0.16+0.25+0.36)/6=1.54/6\approx0.2567\).

For the two clusters, the means are \(0.8\) and \(1.8\). Each cluster's empirical variance is \((0.1^2+0+0.1^2)/3=0.0067\). Each group has proportion \(1/2\), so the within-group contribution is approximately \(0.0067\), and the between-group contribution is \(\tfrac12(0.8-1.3)^2+\tfrac12(1.8-1.3)^2=0.25\). Their sum, \(0.2567\), matches the pooled variance. Here, most pooled spread comes from separation between the cluster centers. That calculation does not establish why such clusters occurred; the display is a prompt to examine the construction and context of the weights.

Scale Changes and Interpretation

A common multiplicative rescaling can change the numerical center and spread without changing the basic shape. The following result makes precise how the empirical skewness behaves under such a change. It is useful when checking whether a shape description depends on the units in which weights are displayed.

Result: For \(a>0\) and any constant \(b\), define \(V_i=a\hat W_i+b\). The empirical mean and variance of \(V_i\) are \(a\bar W+b\) and \(a^2m_2\), respectively. If \(m_2>0\), their moment-based skewness is the same as that of the \(\hat W_i\).

Indeed, \(\bar V=n^{-1}\sum_i(a\hat W_i+b)=a\bar W+b\), so \(V_i-\bar V=a(\hat W_i-\bar W)\). Consequently \(m_{2,V}=a^2m_2\) and \(m_{3,V}=a^3m_3\). Since \(a>0\), \(m_{2,V}^{3/2}=a^3m_2^{3/2}\), and therefore \(g_{1,V}=m_{3,V}/m_{2,V}^{3/2}=g_1\). \(\square\)

This identity does not mean all displays are visually identical: the horizontal axis changes, and histogram bin boundaries must be transformed consistently. Nor does invariant skewness imply that a common rescaling is appropriate for the estimator. It only clarifies which aspect of the empirical shape remains unchanged under positive affine transformations.

Worked Example: Unusual Concentration Despite the Same Mean

Compare two sets of six positive weights. Set A is \(0.95,0.98,0.99,1.01,1.02,1.05\). Set B is \(0.2,0.4,0.7,1.3,1.6,1.8\). Both have mean 1: their sums are 6.

For A, the deviations from 1 are \(-0.05,-0.02,-0.01,0.01,0.02,0.05\). The empirical variance is \((0.0025+0.0004+0.0001+0.0001+0.0004+0.0025)/6=0.001\). Its histogram would show an unusually tight concentration around 1 compared with B.

For B, the deviations are \(-0.8,-0.6,-0.3,0.3,0.6,0.8\). The empirical variance is \((0.64+0.36+0.09+0.09+0.36+0.64)/6=2.18/6\approx0.3633\). The means match, but the spreads differ greatly. A narrow distribution may reflect the particular fitted probabilities or numerator and denominator models; concentration alone does not show that a model is correct, and dispersion alone does not show that it is incorrect. Interpretation requires the analysis context and other diagnostics.

Practical Reading and Common Pitfalls

A useful reading sequence is to inspect a histogram, compare it with a density estimate under more than one reasonable smoothing choice, and then check whether the mean, median, variance, and skewness support the visual description. If a feature is sensitive to binning or smoothing, describe that uncertainty rather than declaring a stable mode. If the distribution is very concentrated, say so, but do not infer a specific cause from its appearance alone.

The main alternatives are complementary rather than competing methods. A histogram preserves direct information about observed counts but depends on bins. A density estimate offers a smoother shape but depends on bandwidth. Numerical summaries are reproducible and compact but can conceal clusters: a single mean and variance do not specify the distribution. Reading all three together is more informative than treating any one as a definitive diagnostic.

  • Pitfall: treating the mean as a shape diagnostic. A mean near one does not rule out skewness, multiple modes, or broad dispersion. Inspect the plot and other summaries.
  • Pitfall: calling every bump a mode. A bump may disappear when bins or bandwidth change. Check reasonable display choices and report uncertainty.
  • Pitfall: diagnosing a cause from a shape. A right-skewed, multimodal, or concentrated plot does not by itself identify misspecification or a positivity problem. It describes estimated weights, not the mechanism that produced them.
  • Pitfall: pooling unlike observations without notice. Combining weights across analysis times changes the empirical distribution being described. State which weights and analysis units are included.

These plots are descriptive diagnostics, not formal tests of exchangeability, positivity, or correct model specification. They also do not account for dependence when units are clustered or repeated observations are included. Use them to formulate questions for subsequent diagnostics, and avoid assigning more evidential force to a visual pattern than it can support.

Check Your Understanding

Answer each question, then compare with the brief solutions.

  1. Why can a histogram with two visible peaks not establish that the underlying weights come from two distinct populations?
  2. A weight distribution has mean 1 and median 1. What can you conclude about its skewness or spread?
  3. For six weights with group means \(0.8\) and \(1.8\), each group having proportion \(1/2\), calculate the between-group contribution to pooled variance.
  4. What is one advantage and one limitation of a density plot compared with a histogram?

Solutions. (1) Bin width, bin origin, sample size, and density bandwidth can change apparent peaks; distinct peaks may also have several possible explanations. (2) Only the reported center summaries are equal. The distribution may still have substantial spread, multiple modes, or asymmetry. (3) The pooled mean is \(0.5(0.8)+0.5(1.8)=1.3\), so the contribution is \(0.5(0.8-1.3)^2+0.5(1.8-1.3)^2=0.25\). (4) A density plot gives a smooth view of shape, but its appearance depends on bandwidth; a histogram shows counts directly, but depends on bins.

Clinical Biostats