Tutorials › Multiple Imputation by Chained Equations (MICE) › Binomial Models For Bounded Counts

Imputation Models by Variable Type · Tutorial 182 of 497

Binomial Models For Bounded Counts

You will learn to specify, fit, and diagnose a binomial regression for bounded counts in MICE, including how the known number of trials affects each imputation.

Intermediate 12 min read

What You'll Learn

  • Recognize bounded counts that can be represented as successes out of a known number of trials.
  • State the binomial regression assumptions and interpret its conditional mean and variance.
  • Derive the intercept-only maximum-likelihood estimate of the success probability.
  • Draw an imputed count using a coefficient draw and a binomial predictive draw.
  • Diagnose mismatched trial counts, dependence, overdispersion, and other failures of the binomial model.
  • Distinguish binomial outcomes from unrestricted counts and from models that separately represent excess zeros.

Why the Maximum Matters

Some count variables cannot take arbitrarily large values. A patient may have a number of symptoms out of a fixed checklist, a student may answer a number of questions correctly out of a known test length, or a clinic may record a number of doses taken out of those prescribed. If the maximum is known for each person, it is part of the information needed to model the count. A binomial model represents the count as successes among a specified number of trials.

The key distinction is not simply that the observed values are integers. An unrestricted count model, such as a Poisson model, assigns probability to counts above any finite bound. A binomial model does not: if person \(i\) has \(m_i\) trials, their count can only be from 0 to \(m_i\). This support restriction is useful in MICE because an imputed value must be a possible count for that person.

Definition: A count \(Y_i\) is modelled as binomial with known number of trials \(m_i\) and success probability \(p_i\) when \(Y_i\mid m_i,p_i\sim\operatorname{Binomial}(m_i,p_i)\). Equivalently, \(Y_i\) is the sum of \(m_i\) Bernoulli outcomes, each with probability \(p_i\) of success. In binomial regression, the probability may depend on covariates: \(\operatorname{logit}(p_i)=\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta}\).

The usual binomial model assumes that, conditional on the predictors and parameters, the trials for an individual are independent and share a common success probability \(p_i\). The trial count \(m_i\) must be known, and the recorded count must refer to successes among exactly those trials. Across individuals, the model treats outcomes as conditionally independent given the included predictors and parameters. These are substantive assumptions, not consequences of choosing a binomial distribution.

Model and MICE Imputation

For a binomial regression, the conditional probability is linked to predictors by the logit:

$$ p_i=\frac{\exp(\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta})} {1+\exp(\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta})}, \qquad Y_i\mid \mathbf{x}_i,m_i,\boldsymbol{\beta}\sim \operatorname{Binomial}(m_i,p_i). $$

Here \(\mathbf{x}_i\) contains an intercept and the chosen predictors, and \(\boldsymbol{\beta}\) is the vector of regression coefficients. The model implies \(E(Y_i\mid\mathbf{x}_i,m_i)=m_i p_i\) and \(\operatorname{Var}(Y_i\mid\mathbf{x}_i,m_i)=m_i p_i(1-p_i)\). Thus, equal covariates do not imply equal expected counts when trial counts differ.

In a MICE iteration, the conditional model for a count with missing values is fitted using rows where that count and the required predictors are observed. For a missing count, the imputation should account for both parameter uncertainty and individual outcome variation: draw a plausible coefficient vector, calculate the resulting \(p_i\), and draw a count from \(\operatorname{Binomial}(m_i,p_i)\). Drawing only the fitted mean \(m_i p_i\) would generally produce a non-integer value and would omit predictive variation. Using fixed estimated coefficients alone would also omit uncertainty about the fitted model.

1
Fit the conditional model.
Use observed counts and their known trial counts, together with the selected predictors, to fit the binomial regression.
2
Draw model parameters.
Draw \(\boldsymbol{\beta}\) from an appropriate estimate of its sampling or posterior uncertainty, rather than treating the fitted coefficients as known.
3
Calculate the individual probability.
For a row with a missing count, use its predictors in the logit model to obtain \(p_i\).
4
Draw the count.
Sample \(Y_i\sim\operatorname{Binomial}(m_i,p_i)\). The result is an integer in the allowed range from 0 through \(m_i\).

The specific method for drawing regression parameters depends on the fitting implementation; the essential point is that parameter uncertainty is represented across imputations. The binomial predictive draw then supplies the within-model variation. As with any chained-equations model, the predictors should be chosen to support the intended analyses and to preserve important relationships in the data.

Worked Example: Interpreting a Fitted Probability

Suppose a hypothetical symptom checklist has \(m_i=8\) items for each patient. For one patient, a fitted binomial regression gives \(\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta}=0.2\). Calculate the success probability, expected symptom count, and conditional variance.

The logistic transformation gives \(p_i=\exp(0.2)/(1+\exp(0.2))\approx0.5498\). This is the modelled probability of a success on each checklist item, conditional on the predictors and the binomial assumptions.

Using the unrounded probability, the expected count is \(m_i p_i=8p_i\approx8(0.549834)=4.399\) symptoms. Using the displayed rounded probability instead gives \(8(0.5498)=4.3984\), which also rounds to 4.398 at four significant figures. The expectation need not be an integer; an actual imputed count will be an integer.

The conditional variance is \(m_i p_i(1-p_i)\). Substituting the displayed rounded probability gives \(8(0.5498)(1-0.5498)=8(0.5498)(0.4502)=1.98015968\), or approximately \(1.980\) symptoms squared. The corresponding standard deviation is approximately \(\sqrt{1.980}=1.407\) symptoms. These summaries describe the predictive distribution, not a guarantee that an individual count will be near its mean.

Why the Number of Trials Must Be Included

The same probability \(p_i\) can imply very different count distributions at different trial counts. A person with two opportunities for success cannot have a count above two; a person with twenty opportunities can. The binomial variance also changes with \(m_i\). Treating all counts as though they had the same maximum discards this information and can produce implausible imputations.

The trial count is not merely another ordinary predictor when the outcome is a count of successes out of trials. It determines the support and the number of Bernoulli opportunities in the distribution. A model of the expected count alone does not, by itself, ensure that draws stay below each person's maximum. If \(m_i\) varies, the binomial likelihood uses the corresponding \(m_i\) for every row.

A simple derivation makes this role clear. For a common probability \(p\) and observed counts \(y_i\) out of \(m_i\), the likelihood is the product of the binomial probabilities. Ignoring factors that do not involve \(p\), the log-likelihood is:

$$ \ell(p)=\sum_i \left[y_i\log(p)+(m_i-y_i)\log(1-p)\right]+\text{constant}. $$

Differentiating with respect to \(p\) gives \(\ell'(p)=\sum_i y_i/p-\sum_i(m_i-y_i)/(1-p)\). Setting this derivative to zero and multiplying by \(p(1-p)\) yields \((1-p)\sum_i y_i-p\sum_i(m_i-y_i)=0\). Rearranging gives \(\sum_i y_i=p\sum_i m_i\), so the maximum-likelihood estimate is total successes divided by total trials. This derivation assumes a common \(p\), independent binomial observations, and at least one success and one failure overall for an interior estimate.

Worked Example: Estimating a Common Probability With Unequal Trial Counts

In hypothetical data, three individuals have trial counts \(2\), \(20\), and \(10\), and observed success counts \(0\), \(3\), and \(2\), respectively. Under an intercept-only binomial model with a common success probability, find the maximum-likelihood estimate and fitted expected counts.

The total number of successes is \(0+3+2=5\), and the total number of trials is \(2+20+10=32\). Therefore, \(\hat p=5/32=0.15625\), approximately \(0.1563\). This estimate weights the individual proportions according to the number of trials, as required by the binomial likelihood.

The fitted expected count for each individual is \(m_i\hat p\). Using the unrounded estimate, the three expected counts are \(2(5/32)=10/32=0.3125\), \(20(5/32)=100/32=3.125\), and \(10(5/32)=50/32=1.5625\approx1.563\). Each is within its individual's possible range. These are expected values, not the integer imputed counts themselves.

The model's common-probability assumption is a simplification here: it says all three individuals have the same probability per trial. If measured predictors explain probability differences, a regression model can allow \(p_i\) to vary. In either case, the known trial count remains part of each person's distribution.

Worked Example: Drawing an Imputed Count

Suppose a hypothetical row has \(m_i=10\) trials and, after a coefficient draw, its predicted probability is \(p_i=0.4502\). Demonstrate how an inverse cumulative-probability draw with \(u=0.62\) selects an imputed count.

For \(Y_i\sim\operatorname{Binomial}(10,0.4502)\), the probabilities for counts 0 through 5 are approximately \(0.0025,\ 0.0207,\ 0.0761,\ 0.1663,\ 0.2383,\ 0.2341\). The cumulative probabilities through counts 0 through 5 are approximately \(0.0025,\ 0.0232,\ 0.0993,\ 0.2656,\ 0.5039,\ 0.7380\).

An inverse-CDF draw chooses the smallest count \(k\) such that \(P(Y_i\leq k)\geq u\). Here, \(P(Y_i\leq4)\approx0.5039<0.62\), while \(P(Y_i\leq5)\approx0.7380\geq0.62\). Therefore the imputed count is 5. It is an allowable integer between 0 and 10. In an actual imputation, the coefficient draw and the random uniform draw are repeated as needed across MICE iterations and completed data sets.

Assumptions, Diagnostics, and Alternatives

A binomial model is most defensible when the upper bound is known for each row and the count truly represents successes out of that many opportunities. Check that the definition of a success is consistent, that trial counts are correctly recorded, and that each observed count satisfies \(0\leq y_i\leq m_i\). If trial counts differ, verify that the model uses each row's own \(m_i\). A count exceeding its stated maximum signals a data-definition or coding problem; it is not fixed by fitting the model.

The shared-probability assumption within an individual's trials can fail when some trials are systematically more likely to succeed than others. Conditional dependence among trials can also create more variation than \(m_i p_i(1-p_i)\). At the population level, unmodelled heterogeneity in probabilities can likewise lead to overdispersion relative to the binomial regression. Examine observed and fitted counts across predictor patterns and trial-count groups, and assess whether residual variation is materially greater than the model expects. Sparse outcomes, near-perfect prediction, or all-success/all-failure groups can make coefficient estimates unstable or effectively unbounded; warning signs include convergence difficulties and very large fitted coefficients.

An unrestricted Poisson count model may be unsuitable when it allows values above a genuine maximum. Negative-binomial models address a different count-distribution feature, overdispersion, but do not automatically impose a row-specific upper bound. Zero-inflated and hurdle models are alternatives when a substantive process justifies a distinct mechanism for zeros; they do not replace the need to represent a known number of trials when the outcome is successes out of trials. These approaches answer different modelling needs, so the choice follows the data-generating structure rather than a preference for a more elaborate distribution.

A binomial model is not appropriate merely because a variable happens to have a finite observed range in the sample. The maximum must be a meaningful number of opportunities, not just the largest value seen so far. Likewise, if the number of trials is unknown or missing, the usual binomial imputation cannot be applied as stated: the support and distribution depend on \(m_i\). Such a case requires a justified treatment of the trial count as well as the outcome.

Common Mistakes

  • Ignoring the denominator. Fitting a model to counts alone as if all rows had the same number of opportunities can misrepresent both expected values and allowable ranges. Use the known \(m_i\) in the binomial distribution.
  • Imputing the expected count. The quantity \(m_i p_i\) is generally fractional and is a mean, not a simulated outcome. Draw from the binomial predictive distribution.
  • Assuming a finite sample maximum is a true bound. A largest observed count does not establish a known number of trials. Confirm the maximum from the measurement process.
  • Assuming the binomial model handles every kind of extra variation. Dependence and unmodelled probability heterogeneity can violate its variance assumptions. Diagnose fit rather than assuming bounded support guarantees a good model.
Key takeaway: For a bounded count that represents successes among known trials, model \(Y_i\) as \(\operatorname{Binomial}(m_i,p_i)\), let predictors explain \(p_i\), and draw each missing count from its row-specific predictive distribution. The bound and the trial count are essential parts of the model.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. A test score is the number correct out of 12 questions. What makes a binomial model plausible, and what assumptions should be checked?
  2. For an individual with \(m_i=6\) and \(p_i=0.25\), calculate the expected count and variance.
  3. In an intercept-only binomial model, observations have 4 successes in 10 trials and 2 successes in 6 trials. Find the maximum-likelihood estimate of the common probability.
  4. Explain why imputing \(m_i p_i\) is not the same as drawing a binomial imputation.

Solutions. (1) The score is bounded from 0 to 12 and represents successes across 12 known opportunities. Check that each question is a consistently defined trial, that successes are conditionally independent with a common probability for the student under the model, and that relevant differences among students are represented by predictors. (2) The mean is \(m_i p_i=6(0.25)=1.5\) correct answers. The variance is \(m_i p_i(1-p_i)=6(0.25)(0.75)=1.125\) answers squared. (3) There are \(4+2=6\) successes in \(10+6=16\) trials, so \(\hat p=6/16=0.375\). (4) The expected count \(m_i p_i\) is a conditional mean and can be fractional; a binomial draw is a random integer from 0 through \(m_i\) and includes predictive variation.

Clinical Biostats