Tutorials › Multiple Imputation by Chained Equations (MICE) › Trace Plots of Quantiles and Tail Statistics

Convergence and Diagnostics Against Observed Data · Tutorial 205 of 497

Trace Plots of Quantiles and Tail Statistics

Learn to define quantile and tail summaries consistently across MICE iterations, calculate them, and interpret their traces alongside location and dispersion diagnostics.

Advanced 10 min read

What You'll Learn

  • Define a chain-level quantile trace using a consistent empirical quantile convention.
  • Calculate upper-tail summaries such as threshold exceedance proportions and averages of the largest values.
  • Explain how chains can have the same mean and variance but different quantiles and extremes.
  • Choose between summaries of imputed cells and summaries of the full completed variable.
  • Recognize when sparse tails or isolated extremes make a trace hard to interpret.
  • Use quantile and tail traces as diagnostics without treating them as proof of convergence.

Why Trace Quantiles and Tails?

A trace of the mean can look steady while the upper end of an imputed distribution changes substantially. A trace of dispersion can help, but a single measure of spread still cannot describe every change in shape: two distributions may have the same mean and variance while differing in their quantiles or most extreme values. For skewed variables, variables with outliers, or variables whose upper or lower tails matter scientifically, these differences can be important.

Quantile and tail traces extend the chain summaries used in MICE diagnostics. At each iteration, they reduce the current imputations to a small number of statistics; plotting those statistics against iteration makes changes in distribution shape easier to notice. A trace is a diagnostic view of selected features, not a formal guarantee that the imputation process has reached a stable distribution.

Definition: Let \(Z^{(r)}_t\) denote the imputed values for one variable in chain \(r\) at iteration \(t\). A quantile trace plots a chosen empirical quantile \(Q_p(Z^{(r)}_t)\) against \(t\), for a fixed probability \(p\), such as 0.25, 0.50, or 0.90. A tail-statistic trace plots a consistently defined summary of the upper or lower tail, such as the fraction above a fixed threshold, the mean of the largest \(k\) values, or an extreme value.

The target set of values must be stated. One useful choice is the imputed cells for the variable: this focuses directly on what the algorithm is generating. Another is the full completed variable, combining observed values with the current imputations. The observed values do not change across iterations, so they can dilute movement in the imputations. Neither choice is universally correct; interpret the trace according to the set summarized, and use the same choice at every iteration.

Definitions and a Consistent Quantile Convention

For a finite set of \(n\) values, sort them as \(z_{(1)} \leq z_{(2)} \leq \cdots \leq z_{(n)}\). This tutorial uses the nearest-rank empirical quantile: for \(0 < p \leq 1\), \(Q_p=z_{(\lceil np\rceil)}\), where \(\lceil a\rceil\) is the smallest integer greater than or equal to \(a\). Other software may interpolate between ordered values, so the quantile convention should be recorded and held fixed when comparing traces.

$$ Q_p(Z^{(r)}_t)=z^{(r)}_{(\lceil n p\rceil),t} $$

A tail summary should also be defined before plotting. For a fixed threshold \(c\), the upper-tail exceedance proportion is the number of values greater than \(c\), divided by \(n\). If there is at least one value above \(c\), the conditional upper-tail mean is the average of those values. The threshold should be specified on the variable’s measurement scale and should not be changed from iteration to iteration. Alternatively, the mean of the largest \(k\) values summarizes the most extreme \(k\) observations without requiring a threshold. The maximum is simple to compute, but is especially sensitive to a single value.

$$ \widehat{P}_t(Z>c)=\frac{\#\{z_i>c\}}{n}, \qquad \overline{Z}_{\,>c,t} =\frac{\sum_{i:z_i>c}z_i}{\#\{z_i>c\}} $$

The conditional mean is undefined when no value exceeds \(c\); it should not be silently recorded as zero. In that situation, report the exceedance proportion as zero and mark the conditional mean as undefined. For a lower-tail diagnostic, the inequalities are reversed. In every case, report the variable’s units and keep the definition, target set, and scale constant across chains and iterations.

Why Quantiles Can Reveal What Mean and Variance Miss

The reason to examine more than location and spread is not merely visual. Mean and variance constrain only two features of a distribution. They do not uniquely determine its quantiles or extremes. The following calculation gives two sets with identical means and sample variances but different upper quantiles and maxima.

$$ A=(-3,-1,0,0,1,3),\qquad B=(-\sqrt{5},-\sqrt{5},0,0,\sqrt{5},\sqrt{5}) $$

Each set has six values summing to zero, so both means are zero. For \(A\), the sum of squared deviations from the mean is \(9+1+0+0+1+9=20\). For \(B\), it is \(5+5+0+0+5+5=20\). Thus each sample variance is \(20/(6-1)=4\). However, the nearest-rank 75th percentile is the fifth ordered value: \(Q_{0.75}(A)=1\), while \(Q_{0.75}(B)=\sqrt{5}\), about 2.236. Their maxima also differ: 3 versus \(\sqrt{5}\). A mean trace and a variance trace could therefore be identical even when an upper-quantile trace is not.

Worked Example: A Quantile Trace Separates Two Iterations

Suppose a hypothetical MICE chain imputes eight missing values of a continuous outcome. At iteration 1, the ordered imputed values are \(1,2,2,3,4,5,6,20\). At iteration 2, they are \(1,2,3,4,5,6,7,8\). Calculate the nearest-rank 25th, 50th, and 90th percentiles at each iteration.

There are \(n=8\) values. The ranks are \(\lceil 8(0.25)\rceil=2\), \(\lceil 8(0.50)\rceil=4\), and \(\lceil 8(0.90)\rceil=8\). At iteration 1, the second, fourth, and eighth ordered values are 2, 3, and 20. Therefore \(Q_{0.25}=2\), \(Q_{0.50}=3\), and \(Q_{0.90}=20\).

At iteration 2, the same ranks select 2, 4, and 8. Thus \(Q_{0.25}=2\), \(Q_{0.50}=4\), and \(Q_{0.90}=8\). The lower quartile is unchanged, the median increases by 1 outcome unit, and the 90th percentile decreases by 12 outcome units. These summaries show a substantial change near the upper end that would be hidden by plotting only the lower quartile.

The traces cannot establish why the upper end changed. It may reflect movement in the chain’s imputed distribution, or it may be a short-lived fluctuation. The relevant diagnostic observation is that this feature of the distribution differs across the two iterations and merits attention in the wider chain history.

Reading Tail Summaries in Context

A high quantile, an exceedance proportion, and a tail mean answer different questions. A quantile gives a location in the ordered distribution. An exceedance proportion gives the share of values beyond a fixed, interpretable threshold. A conditional tail mean describes the values that cross that threshold, but can be volatile when only a few values exceed it. A maximum describes the most extreme recorded value and is more sensitive still. Choosing a summary should follow the diagnostic question, rather than a search for one statistic that captures every aspect of the tail.

Worked Example: Comparing Threshold Exceedance and Tail Magnitude

Consider two hypothetical iterations of ten imputed laboratory values, measured in mg/L. At iteration 1, the values are \(2,3,4,5,6,7,8,9,10,30\). At iteration 2, they are \(2,3,4,5,6,7,8,9,20,21\). Using \(c=15\) mg/L, calculate the exceedance proportion and the conditional upper-tail mean at both iterations.

At iteration 1, only 30 mg/L exceeds 15 mg/L. The exceedance proportion is \(1/10=0.10\), or 10%. The conditional upper-tail mean is \(30/1=30\) mg/L.

At iteration 2, both 20 and 21 mg/L exceed 15 mg/L. The exceedance proportion is \(2/10=0.20\), or 20%. The conditional upper-tail mean is \((20+21)/2=20.5\) mg/L. The first iteration has a more extreme single value, but the second has twice the share above the threshold. Reporting both summaries distinguishes the frequency of large values from their average magnitude among exceedances.

The threshold of 15 mg/L must be justified for the intended diagnostic purpose; it is not automatically meaningful simply because the calculation is easy. If no defensible threshold is available, selected quantiles or the mean of a fixed number of largest values may be more suitable summaries.

Choice of Summary, Diagnostics, and Limitations

For a continuous variable with enough imputed values, a useful starting set might include the median and one lower and one upper quantile, such as the 10th and 90th percentiles. Add a tail statistic when there is a specific concern about extreme values or a meaningful threshold. Plotting many highly related summaries can make a trace difficult to read; select a small set that answers a clear question. Use separate panels or scales if summaries have different units or ranges, and label the statistic, target set, units, and quantile convention.

Look for changes in level or shape in the plotted summaries, repeated unusual spikes, or tail statistics that behave differently from the median and central quantiles. These observations are prompts for investigation, not automatic diagnoses. Check that the imputed values and summaries are calculated correctly, that the same cells and rules are used at every iteration, and that extreme values are plausible on the variable’s scale. A single spike in a maximum may be genuine variability; repeated implausible extremes may suggest a model or data-processing problem. A flat trace is not proof of adequate mixing or convergence.

Sparse tails require particular caution. If only a few cells are imputed, a high empirical quantile may select the maximum, so a one-value change can produce a large jump. For a threshold summary, the exceedance proportion changes in increments of \(1/n\); with \(n=5\), for example, each value changes the proportion by 0.20. A conditional tail mean based on one or two values is likewise sensitive to individual draws. State the number of imputed cells summarized and avoid interpreting such traces as precise estimates of a population tail.

Quantile and tail traces complement, rather than replace, traces of means and dispersion summaries. Means can be useful for location and dispersion summaries for overall spread, but neither alone identifies where changes occur in a distribution. Quantile traces provide selected points across its shape; tail summaries focus on specified extremes. Direct distributional comparisons answer a different question: they compare distributions at selected states rather than tracking a single summary through iterations. No finite collection of summaries captures the entire distribution, and summaries of imputed cells alone do not describe the full completed data distribution.

1
Specify the target.
Decide whether each iteration’s summary will use only imputed cells or the full completed variable, and use that same set throughout.
2
Define the statistic.
Record the quantile convention or the exact tail rule, including any threshold and the number of largest values used.
3
Calculate and plot consistently.
Apply the definition to each chain at each iteration, retaining units and comparable axes.
4
Interpret with care.
Compare tail behavior with central summaries, consider the number of values supporting each statistic, and investigate unusual patterns without treating a trace alone as proof.

Worked Example: A High Quantile With Only Five Imputations

Suppose a hypothetical variable has five imputed values at each iteration. At three consecutive iterations, the ordered values are respectively \(1,2,3,4,12\), \(1,2,3,4,40\), and \(1,2,3,4,13\). Calculate the median, the nearest-rank 90th percentile, and the mean of the two largest values for each iteration.

For \(n=5\), the median rank is \(\lceil 5(0.50)\rceil=3\), so the median is 3 at all three iterations. The 90th-percentile rank is \(\lceil 5(0.90)\rceil=5\), so the 90th percentiles are 12, 40, and 13. The means of the two largest values are \((4+12)/2=8\), \((4+40)/2=22\), and \((4+13)/2=8.5\), respectively. All three statistics are in the variable’s measurement units.

The stable median does not imply stable upper-tail summaries. But because the 90th percentile is the maximum here, its jump from 12 to 40 is entirely determined by one value. The calculation identifies a pattern worth checking; it does not establish that 40 is erroneous. Examine the value’s plausibility, the imputation and analysis rules, and the behavior of other summaries before drawing a conclusion.

Common Pitfalls

  • Using different definitions between iterations. Changing quantile interpolation or the tail threshold can create an apparent trace movement. Fix the rule before calculating summaries.
  • Calling a flat quantile trace proof of convergence. A selected quantile only describes one feature of the distribution; other features or aspects of chain behavior may still change.
  • Over-interpreting an extreme value. A maximum or high quantile based on very few imputed cells is sensitive to one draw. Report how many values support the statistic and check the scale and plausibility.
  • Confusing a tail proportion with tail magnitude. The fraction beyond a threshold and the average among exceedances answer different questions, as the worked example demonstrates.
  • Failing to identify the summarized data. A trace of imputed cells and a trace of the full completed variable have different interpretations because observed values are fixed across iterations.

The practical value of these traces is that they make distributional features visible that location and spread summaries can miss. Their limitations are equally important: empirical tails can be noisy, summary definitions affect the plot, and no selected set of traces can certify the behavior of the entire MICE procedure.

Check Your Understanding

Answer each question, then compare with the brief solutions.

  1. For the ordered values \(2,4,5,7,9,11\), find the nearest-rank 50th and 90th percentiles.
  2. Five imputed values are \(1,3,4,8,14\). For a threshold of 10, calculate the exceedance proportion and conditional upper-tail mean.
  3. Why can two chains have similar median traces but different upper-tail traces?
  4. What limitation should be noted when a 90th-percentile trace is calculated from five imputed values using the nearest-rank convention?
  5. Why might a trace based on all completed values show less movement than one based only on imputed cells?

Solutions. (1) The ranks are \(\lceil6(0.50)\rceil=3\) and \(\lceil6(0.90)\rceil=6\), so the quantiles are 5 and 11. (2) One of five values exceeds 10, giving \(1/5=0.20\), or 20%; the conditional mean is 14. (3) The median describes the center, while upper-tail values can change without a corresponding change in the center. (4) Its rank is \(\lceil5(0.90)\rceil=5\), so it is the maximum and can be driven by one value. (5) Observed values are fixed across iterations and can dilute changes in the imputed cells when summaries are calculated over the full completed variable.

Clinical Biostats