Tutorials › Multiple Imputation by Chained Equations (MICE) › Comparing Count Distributions and Zero Frequencies

Convergence and Diagnostics Against Observed Data · Tutorial 226 of 497

Comparing Count Distributions and Zero Frequencies

Compare count frequencies and zero proportions for observed and imputed values, while accounting for imputation-to-imputation variation and differences between the observed and missing cases.

Advanced 12 min read

What You'll Learn

  • Construct frequency and proportion summaries for count-valued variables.
  • Compare observed and imputed zero frequencies without hiding differences behind a mean.
  • Summarize zero frequencies across multiple imputed data sets.
  • Distinguish a marginal discrepancy from a difference explained by case composition.
  • Identify coding, exposure, and Monte Carlo issues that can mislead a comparison.

Why Count Frequencies Need Their Own Check

A count variable can have many zeros, a small set of common positive values, and a few larger counts. Two distributions may have similar means while allocating probability very differently across those values. In a MICE diagnostic, that matters: an imputation model may reproduce the average count yet impute too few zeros, too many small positive counts, or an implausible frequency at a particular upper count. The zero frequency is especially informative when zero has a substantive meaning, such as no events during a fixed observation period.

The comparison is descriptive. It checks whether the distribution of values imputed for cases with a missing count looks plausible relative to the observed counts and the information in the predictors. It is not, by itself, a formal test of the imputation model or evidence that missingness is random. The introductory material on observed-imputed comparisons provides the general diagnostic context; here the focus is on frequency patterns specific to counts.

Definition: For a count variable \(Y\), let \(n_o\) be the number of observed values and \(n_{o,k}\) the number equal to count \(k\). The observed frequency proportion at \(k\) is \(\hat p_{o,k}=n_{o,k}/n_o\). For imputation \(j\), let \(n_{i,j}\) be the number of values imputed for cases missing \(Y\), and \(n_{i,j,k}\) the number imputed as \(k\). The imputed proportion is \(\hat p_{i,j,k}=n_{i,j,k}/n_{i,j}\). In particular, \(\hat p_{o,0}\) and \(\hat p_{i,j,0}\) are the observed and imputed zero proportions.

These summaries are interpretable only if the values refer to the same count definition, units, and observation window. A count of events per patient-month is not directly comparable with a count per patient-year. Likewise, a zero must represent an observed zero count, not a code for “not recorded.” If exposure time varies, raw counts can reflect exposure differences as well as event rates; comparisons should respect the exposure structure used in the analysis.

A useful first display is a table or plot of proportions at each count value, including zero. For sparse counts, adjacent high values may be combined for a stable summary, but retain a separate zero category. The chosen grouping should be stated and applied consistently. These comparisons concern the overall count distribution and zero frequency, not a detailed analysis of tail behavior.

What the Frequencies Reveal That the Mean Can Hide

For a nonnegative integer-valued variable with possible counts \(0,1,\ldots,K\), the mean can be written as a weighted sum of its frequency proportions:

$$ \bar{Y}=\sum_{k=0}^{K}k\hat p_k $$

This one weighted sum does not determine all \(K+1\) proportions. In particular, the mean does not determine the zero proportion. A change in the zero frequency can be offset by changes elsewhere, leaving the mean unchanged. Comparing the frequency vector, rather than relying on the mean alone, exposes those reallocations.

Worked Example: Identical Means, Different Zero Frequencies

Suppose a hypothetical diagnostic has 100 observed counts with frequencies \(0:40,\ 1:30,\ 2:20,\ 4:10\). In one imputed data set, 100 missing cases receive counts with frequencies \(0:10,\ 1:80,\ 3:10\). Compare their means and zero proportions.

For observed values, the mean is \( (0\times40+1\times30+2\times20+4\times10)/100=(30+40+40)/100=1.10 \). The observed zero proportion is \(40/100=0.40\), or 40%.

For imputed values, the mean is \( (0\times10+1\times80+3\times10)/100=(80+30)/100=1.10 \). The imputed zero proportion is \(10/100=0.10\), or 10%.

The means are exactly equal at 1.10 counts per case, but the imputed values have a zero frequency 30 percentage points lower. Their positive counts are also allocated differently: the observed values include counts of 2 and 4, whereas this imputed set concentrates on 1 and includes 3. The matching means do not establish that the count distributions match.

The example shows why a zero proportion should be reported alongside, not instead of, the rest of the count distribution. A zero-only comparison can miss substantial differences among positive counts; conversely, a broad histogram can make a practically important zero discrepancy hard to see. Check the zero proportion and the count-by-count frequencies, or a clearly described grouping of counts.

Comparing Across Multiple Imputations

Each imputed data set contains a draw for each case whose count was missing. The imputed frequency proportions can vary from one completed data set to another because the imputations are draws, not identical replacements. Summarize that variation rather than selecting one imputation as if it represented all of them. A transparent summary is the mean of the imputation-specific proportions, accompanied by their range or standard deviation. The across-imputation spread is descriptive; it is not a confidence interval for the missing-data population proportion.

When every imputation contains the same \(n_i\) missing cases, averaging the \(m\) zero proportions gives the same result as pooling their zero counts over all \(m n_i\) draws. If the denominators differ, the unweighted mean and pooled proportion need not agree; state which summary is being used. In either case, the \(m\) versions of a case are repeated imputations of that case, not \(m\) new independent individuals.

Worked Example: Summarizing Zero Frequencies Across Five Imputations

Suppose 80 count values are missing, and five hypothetical imputations produce 16, 20, 12, 24, and 8 zeros, respectively. Each imputation therefore has the same denominator, 80. Calculate the zero proportion for each, the average, and the range.

The five proportions are \(16/80=0.20,\ 20/80=0.25,\ 12/80=0.15,\ 24/80=0.30,\) and \(8/80=0.10\). Their mean is \( (0.20+0.25+0.15+0.30+0.10)/5=1.00/5=0.20 \). The range is 0.10 to 0.30, a 20-percentage-point span.

Pooling gives \( (16+20+12+24+8)/(5\times80)=80/400=0.20 \), the same average because each imputation has 80 values. If the observed counts had 30 zeros among 100 observed cases, their observed zero proportion would be 0.30. The imputed mean is then 10 percentage points lower, but the imputation-specific proportions vary from 0.10 to 0.30. That variation is relevant: the difference should not be described as a fixed feature of every completed data set.

For a frequency table, apply the same summarizing idea to each count value or grouped category. A display can show observed proportions alongside the mean imputed proportion, with the imputation-specific range indicated. If chain-level summaries have not stabilized, apparent differences may partly reflect where the chains were in their simulation. Use the established convergence and Monte Carlo diagnostics before treating a frequency summary as representative of the fitted procedure.

Interpret Differences in Context

Observed values belong to cases whose count was recorded; imputed values belong to cases whose count was missing. Those groups can differ in their predictor values. Therefore their marginal frequency proportions need not be equal even when the conditional imputation model is appropriate. For example, if counts tend to be lower in one predictor group and the observed cases contain more members of that group, an observed-imputed marginal difference could reflect group composition rather than a failure to reproduce counts within groups.

Worked Example: A Marginal Zero Difference Explained by Case Composition

Consider a hypothetical binary predictor identifying low- and high-risk cases. Among 50 observed low-risk cases, 40 have count zero; among 50 observed high-risk cases, 10 have count zero. Thus the observed zero proportion is \((40+10)/100=0.50\). Suppose the 100 cases with a missing count are all high-risk, and the imputation model assigns 20 zeros and 80 ones.

The imputed zero proportion is \(20/100=0.20\), 30 percentage points below the observed marginal proportion. But within the high-risk group, the observed zero proportion is \(10/50=0.20\), exactly matching the imputed proportion of \(20/100=0.20\). The marginal comparison differs because the observed set includes 50 low-risk cases, while the missing set in this example contains only high-risk cases.

This does not prove that the model is correct: the example checks only one conditional proportion and uses hypothetical data. It does show why a marginal discrepancy is a signal to investigate, not an automatic verdict. Compare like with like when predictor composition is important, and examine whether the model includes relevant predictors.

Also inspect whether the zero has more than one possible meaning. A genuine zero count, a structural zero that cannot occur for some cases, and a recording or coding error are different situations. An imputation model that treats these as one ordinary numeric count may generate values that are implausible for the data collection process. Confirm the coding and the substantive meaning of zeros before interpreting the plot.

A Practical Diagnostic Sequence

1
Confirm the count definition.
Check that observed and imputed values use the same event definition, units, exposure period, and coding. Resolve special missing-value codes before counting zeros.
2
Tabulate frequencies.
For observed values and separately for each imputation, calculate the zero proportion and the proportions at the count values or stated grouped categories.
3
Compare the full pattern.
Look for differences in zeros and positive-count frequencies, not just differences in means. Report the denominators and retain imputation-to-imputation variation in the display or summary.
4
Investigate plausible explanations.
Check predictor composition, sparse categories, exposure differences, and whether relevant predictors were used. Revisit convergence and Monte Carlo stability if the imputed frequencies vary markedly across chains or iterations.

Common Pitfalls and Limitations

  • Declaring success because the means agree. The worked example shows that equal means can coexist with a large zero-frequency difference. Compare frequencies as well as location summaries.
  • Calling every marginal difference model failure. Observed and missing cases may have different predictor distributions. A marginal discrepancy needs interpretation in that context; it does not alone establish that the conditional imputation model is wrong.
  • Pooling imputations as independent observations. Treating all \(m\) draws for each missing case as new independent people overstates the amount of information. Use imputation-specific summaries and describe how they are combined.
  • Ignoring a small denominator. A zero proportion based on very few observed counts can change substantially when only one value changes. Show denominators and avoid overinterpreting unstable percentages.
  • Assuming matching frequencies prove validity. Agreement in a few marginal summaries does not verify the joint relationships, conditional distributions, or missingness assumptions. These checks can reveal problems but cannot establish that the imputation model is correct.

Frequency tables and plots are often more revealing here than a single mean comparison, but they also have limits: sparse counts can make individual proportions noisy, and marginal summaries can hide conditional mismatches. A formal comparison test is not a substitute for checking the data definition, case composition, model specification, and chain stability. The purpose is to identify discrepancies that deserve follow-up, not to certify an imputation procedure.

Check Your Understanding

Answer each question, then check the solutions below the questions.

  1. Among 50 observed counts, 15 are zero. In one imputation, 12 of 60 missing counts are zero. Calculate both zero proportions and their difference in percentage points.
  2. Two count distributions have the same mean. Does that imply their zero proportions are equal? Explain using the weighted-mean formula.
  3. Four imputations each contain 40 imputed counts and have 8, 12, 4, and 16 zeros. Calculate the mean zero proportion, the pooled proportion, and the range.
  4. Observed cases have a 40% zero proportion, while imputed cases have a 20% zero proportion. Name one reason, other than model failure, that could produce this marginal difference.
  5. Why should 400 imputed values from four completed data sets of 100 missing cases not be described as 400 independent individuals?

Solutions. (1) The observed proportion is \(15/50=0.30\), or 30%; the imputed proportion is \(12/60=0.20\), or 20%. The imputed proportion is 10 percentage points lower. (2) No. Since \(\bar Y=\sum_k k\hat p_k\), the mean is only one weighted sum of the frequency proportions; distinct frequency patterns, including distinct zero proportions, can yield the same sum. (3) The proportions are \(8/40=0.20,\ 12/40=0.30,\ 4/40=0.10,\) and \(16/40=0.40\). Their mean is \((0.20+0.30+0.10+0.40)/4=0.25\). The pooled proportion is \((8+12+4+16)/(4\times40)=40/160=0.25\), and the range is 0.10 to 0.40. (4) The observed and missing cases may have different predictor composition; for example, the missing cases may be concentrated in a group with a lower zero frequency. (5) Each missing case has four alternative imputed draws across completed data sets, not four distinct people. Those values reflect uncertainty across imputations and are not independent new observations.

Clinical Biostats