Tutorials › Multiple Imputation by Chained Equations (MICE) › Trace Plots of Imputed Proportions for Binary Variables

Convergence and Diagnostics Against Observed Data · Tutorial 215 of 497

Trace Plots of Imputed Proportions for Binary Variables

Learn to plot the imputed event proportion by iteration and chain, and distinguish stable traces from apparent stability caused by rarity or limited resolution.

Advanced 11 min read

What You'll Learn

  • Define the chain-level imputed proportion of ones and its complementary proportion of zeros.
  • Calculate trace values from imputed counts and the number of missing binary values.
  • Interpret trace stability and chain mixing when the event is uncommon.
  • Recognize the resolution limits imposed by a small number of missing values.
  • Identify why a stable proportion alone cannot establish adequate mixing or model fit.
  • Use counts, chain overlays, and complementary diagnostics to avoid misleading conclusions.

Why Trace Imputed Proportions?

For a binary variable, a trace of its imputed proportion is a compact way to see how the balance of imputed zeros and ones changes across iterations of a MICE chain. This is especially useful when the event is uncommon: an overall average can hide whether a chain is stable, drifting, or exploring a different range from other chains. The trace is a diagnostic summary, not a test of convergence and not a comparison of imputed values with observed values.

The construction is simple, but interpretation requires care. The number of missing values is usually fixed, so possible proportions lie on a discrete grid. If only a few values are missing, a one-record change can move the trace substantially. If an event is rare, a trace near zero may be expected, but it can also reflect an imputation model that almost never assigns an event. The plot must be read in light of the number of missing values, chain behavior, and the model used for imputation.

Definition: Suppose a binary variable has \(m\) missing values, and chain \(c\) at iteration \(t\) assigns the value \(Y_{i,c,t}\in\{0,1\}\) to missing record \(i\). The imputed proportion of ones is $$ \hat{p}_{c,t}^{\,\mathrm{imp}}=\frac{1}{m}\sum_{i=1}^{m}Y_{i,c,t}. $$ The imputed proportion of zeros is \(1-\hat{p}_{c,t}^{\,\mathrm{imp}}\). These summaries describe only the currently imputed values among records missing this variable; they do not include the observed records.

Constructing the Trace

For each chain and iteration, count the imputed ones and divide by the number of missing entries for the binary variable. Plot iteration on the horizontal axis and the proportion on the vertical axis. Give each chain a distinct color or line type and overlay the chains when the aim is to compare their trajectories. A point at 0.10 means that one tenth of the missing entries were imputed as one at that iteration; it does not mean that one tenth of all records in the data set had value one.

If the missingness pattern is fixed, the denominator \(m\) does not change across iterations. The possible values are then \(0, 1/m, 2/m,\ldots,1\). The zero proportion contains exactly the same information, since it is one minus the proportion of ones. Plotting both as separate traces is generally redundant. Choose the event coded as one when it has a clear substantive meaning, and label the axis so the coding is unambiguous.

The imputed values are generated under the binary conditional model and predictor information used in the chained updates. For example, a logistic conditional model specifies a probability of one given the predictors, and stochastic imputation uses that probability to generate values for missing records. Interpretation of the trace assumes that the fitted conditional model and its stochastic updating are appropriate for the intended imputation. A trace cannot verify those assumptions; it shows the behavior of one summary produced by the algorithm.

Worked Example: Calculating a Trace Point

Suppose a hypothetical data set has \(m=40\) missing values on a binary outcome, coded one for an event. In chain 1 at iteration 18, 5 of the 40 imputed values are one. The trace value is $$ \hat{p}_{1,18}^{\,\mathrm{imp}}=\frac{5}{40}=0.125. $$ Thus, 12.5% of the currently imputed entries are events, and 35 of 40 are zero. The complementary zero proportion is \(35/40=0.875\), as it must be because \(0.125+0.875=1\).

If the next iteration has 7 imputed ones, the proportion is \(7/40=0.175\), a rise of 0.05. With this denominator, each single record changing from zero to one raises the proportion by \(1/40=0.025\). That resolution matters when deciding whether a visible jump is substantial or simply one or two assignments changing.

Reading Stability and Mixing for an Uncommon Event

A useful trace has no sustained trend after the initial transient period, and multiple chains fluctuate over broadly overlapping ranges rather than remaining separated. The pattern need not be flat: stochastic imputations naturally vary, and a trace with some movement may be healthier than a perfectly constant one. The relevant question is whether the chains appear to explore a stable range of the summary, not whether successive points are identical.

For an uncommon event, the proportion may spend much of its time near zero and occasionally rise when one or more events are imputed. That pattern can be compatible with a genuinely low event probability. However, if the trace stays at zero in all chains, it is not enough to conclude that the algorithm has converged. It may indicate that the conditional model assigns very low probabilities, that the observed information is sparse, or that the chains are stuck in a limited part of the imputation space. Check the event coding, the number of missing entries, the model specification, and other chain diagnostics.

Worked Example: Interpreting a Rare Event Trace

In a hypothetical analysis, \(m=12\) entries are missing for a binary event. In chain 1, the numbers of imputed ones at five successive iterations are \(0,1,0,1,0\). The corresponding proportions are $$ \frac{0}{12}=0,\quad \frac{1}{12}=0.0833,\quad \frac{0}{12}=0,\quad \frac{1}{12}=0.0833,\quad \frac{0}{12}=0. $$

The trace alternates between zero and about 0.0833. A one-record change creates the entire jump, because \(1/m=1/12=0.0833\). This is a coarse trace, not evidence of an eight-percentage-point change in a precisely estimated population event rate. It reports the fraction among just 12 imputed entries.

Suppose chain 2 has counts \(1,0,1,0,1\), giving the same range and a similar pattern. The chains are not separated on this summary, which is reassuring about their agreement in imputed event counts. But this does not show that the same records receive ones in both chains, nor that the conditional model is adequate. The trace supports a limited conclusion about chain-level proportions only.

A Useful Scale Check

The granularity of the trace follows directly from its definition. Let \(K_{c,t}\) be the number of imputed ones. Then $$ \hat{p}_{c,t}^{\,\mathrm{imp}}=\frac{K_{c,t}}{m}. $$ Since \(K_{c,t}\) is an integer, the smallest positive change in the trace occurs when the count changes by one: $$ \frac{K_{c,t}+1}{m}-\frac{K_{c,t}}{m}=\frac{1}{m}. $$ Thus, a denominator of 10 gives steps of 0.10, while a denominator of 200 gives steps of 0.005. This arithmetic explains why traces for small sparse subsets can appear jumpy even when only one assignment has changed.

For orientation only, suppose the imputed indicators behaved like \(m\) independent Bernoulli draws with a common probability \(q\). The variance of their average would be $$ \operatorname{Var}(\hat{p}^{\,\mathrm{imp}})=\frac{q(1-q)}{m}. $$ This follows because each indicator has variance \(q(1-q)\), and the variance of the sum of independent indicators is \(m q(1-q)\), which is divided by \(m^2\) when forming the average. In chained imputation, the values need not be independent or share one probability: their conditional probabilities can differ by record and can depend on shared model-parameter draws. The expression is therefore an explanatory benchmark, not a standard error for a trace point or a convergence criterion.

Worked Example: Comparing Chains Without Overstating the Result

A hypothetical variable has \(m=50\) missing entries. At one late iteration, chain A imputes 2 events and chain B imputes 6 events. Their proportions are $$ \hat{p}_{A}^{\,\mathrm{imp}}=\frac{2}{50}=0.040,\qquad \hat{p}_{B}^{\,\mathrm{imp}}=\frac{6}{50}=0.120. $$ The difference is \(0.120-0.040=0.080\), or four imputed events out of 50. If this separation persists across many late iterations, it suggests the chains may not be mixing well for this summary, or may be sampling different ranges. A single pair of points does not establish persistent separation.

For comparison, suppose the next four counts are 3, 5, 4, and 3 in chain A, and 4, 3, 5, and 4 in chain B. The respective proportions are \(0.06,0.10,0.08,0.06\) and \(0.08,0.06,0.10,0.08\). These short sequences overlap substantially. The early difference may be a fluctuation, but a longer trace is needed to assess persistence, drift, and mixing. Neither the difference nor the overlap alone is a formal convergence verdict.

Diagnostics, Alternatives, and Limitations

Read the trace together with the number of missing values and the event count. A proportion alone can disguise its denominator: 0.10 could mean 1 event among 10 imputations or 100 among 1,000. Reporting or displaying counts alongside the proportion makes the scale transparent. Also inspect the chains separately and overlaid, and look for burn-in behavior, sustained drift, long periods without movement, abrupt changes, and persistent chain separation. These features complement the earlier material on burn-in, mixing, autocorrelation, and effective sample size; no one trace summary replaces those checks.

A particularly important limitation is that the proportion discards record identities. Two successive iterations can have the same count even if the imputed event moves from one missing record to another; conversely, a count can change while many other assignments remain unchanged. A stable proportion therefore does not prove that the imputed data sets are stable or that individual allocations mix well. It can also conceal subgroups behaving differently when the conditional event probabilities vary across records.

For a binary variable, alternative chain summaries include the count of ones, which is equivalent information when \(m\) is fixed, and selected record-level imputation indicators, which show assignment behavior but can produce many plots. General chain diagnostics summarize serial behavior across iterations, while comparison with observed binary proportions addresses a different question: whether imputed and observed values appear distributionally compatible. That observed-versus-imputed comparison is distinct from a trace of imputed proportions and should not be inferred from it.

If \(m\) is very small, the trace may be too coarse to reveal subtle changes. If all plotted values are zero, the y-axis can make the line appear perfectly stable; the count and model-predicted probabilities may reveal how little information the summary contains. If the trace changes sharply, first translate the movement back to an integer count before describing it. Avoid interpreting a local fluctuation as a population-level change or treating visual overlap as proof of convergence.

Key takeaway: A binary imputed-proportion trace tracks the fraction of missing entries assigned one at each iteration in each chain. Its resolution is \(1/m\), and a stable, overlapping trace is useful evidence about this summary—but cannot by itself establish convergence, adequate mixing of individual assignments, or a well-specified imputation model.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. If 9 of 60 missing binary values are imputed as one, what are the imputed proportions of ones and zeros?
  2. With \(m=8\), what is the smallest possible nonzero change in the imputed proportion, and why?
  3. Two chains both have an imputed proportion of 0.05 at every plotted iteration. What can and cannot be concluded?
  4. Why can an unchanged imputed proportion fail to show that the underlying assignments are unchanged?

Solutions. (1) The proportion of ones is \(9/60=0.15\), and the proportion of zeros is \(51/60=0.85\). (2) The smallest change is \(1/8=0.125\), because changing one of the eight imputed entries changes the numerator by one. (3) The chains agree and are stable for this particular summary over the displayed iterations, but this alone does not establish convergence, adequate movement of individual values, or model adequacy; the number of missing entries and other diagnostics matter. (4) Different records can exchange the value one while the total number of ones stays fixed, so the aggregate proportion can remain constant even as assignments change.

Clinical Biostats