Tutorials › Multiple Imputation by Chained Equations (MICE) › Stochastic Conditional Updates

Fully Conditional Specification · Tutorial 108 of 497

Stochastic Conditional Updates

Understand how stochastic conditional updates generate plausible completed values while preserving the variation represented by each conditional model.

Intermediate 9 min read

What You'll Learn

  • Distinguish a conditional draw from a conditional prediction.
  • Follow repeated updates as conditioning information changes.
  • Calculate categorical and continuous conditional draws from specified distributions.
  • Explain why inserting conditional means can suppress variability.
  • Recognize assumptions, diagnostics, and limitations of stochastic updates.

Why a Conditional Update Uses a Draw

In fully conditional specification (FCS), an update for a variable with missing values uses a conditional model based on the other variables currently available in the chain. The central choice is what to insert into a missing cell: the model’s conditional prediction, such as a mean or probability, or a randomly generated value from the conditional distribution. FCS uses the latter. The inserted value is one possible realization under the model, not a summary of all possible values.

This distinction matters because the completed data set is meant to represent uncertainty about missing values. A conditional mean can be useful for describing the model, but replacing every missing value by that mean generally makes the completed data less variable than the conditional model says it should be. A stochastic update instead gives each missing cell a value in the variable’s allowable form and lets that value participate in later updates.

Definition: A stochastic conditional update replaces a missing value of a variable by a random draw from that variable’s specified conditional distribution, evaluated using the current values of the conditioning variables and the current model specification. The draw is a value on the variable’s scale. It is not the conditional mean, mode, or probability itself.

For a binary variable \(X\), for example, a model may assign \(P(X=1\mid Z)=0.7\). The number \(0.7\) describes the conditional distribution; it is not a possible value of \(X\). A draw is either 1 or 0, with probabilities 0.7 and 0.3. For a numeric variable, the conditional distribution assigns probabilities across numeric values, and the update draws one value from that distribution.

The update depends on assumptions. The specified conditional model must be appropriate for the variable’s type and its relationship with the conditioning variables; its probability distribution must be calibrated well enough for the intended use; and a draw must actually be generated from that distribution. The current conditioning values must also be meaningful inputs to the model. Stochastic draws do not repair a misspecified conditional model, incorrect data, or an inadequate treatment of the missingness mechanism. Those missing-data assumptions are a separate issue addressed in the standard material on Overlaps Missing Data.

Worked Examples of Stochastic Updates

Worked Example: Drawing a Missing Binary Value

Suppose a hypothetical FCS update concerns a missing indicator \(X\), where 1 means a patient attended a scheduled follow-up and 0 means the patient did not. Given the current conditioning values, the specified model gives \(P(X=1\mid Z)=0.70\). Use a uniform random number \(U=0.42\) to generate one update, using the rule “set \(X=1\) if \(U<0.70\), and \(X=0\) otherwise.”

Because \(0.42<0.70\), the updated value is \(X=1\). The number inserted is 1, not 0.70. Under repeated updates with the same conditional probability, the long-run fraction of draws equal to 1 is expected to be 0.70, but a particular sequence need not have exactly that fraction.

For example, if four hypothetical draws use \(U=0.42, 0.91, 0.16,\) and \(0.68\), the updated values are \(1,0,1,1\). Their sample proportion is \(3/4=0.75\). It differs from 0.70, as a finite random sequence can, while each draw follows the specified rule.

Worked Example: Repeated Updates as Conditioning Information Changes

Consider one missing binary value \(X\). In a hypothetical two-variable FCS chain, another variable \(Z\) is updated during each sweep. Suppose the \(X\)-conditional model gives \(P(X=1\mid Z=0)=0.20\) and \(P(X=1\mid Z=1)=0.80\). The current values of \(Z\), supplied by its own updates, are 0, 1, and 1 on three successive occasions. For each occasion, use the uniform numbers 0.65, 0.50, and 0.74, respectively.

On the first occasion, \(Z=0\), so the relevant probability is 0.20. Since \(0.65>0.20\), draw \(X=0\).

On the second occasion, \(Z=1\), so the probability becomes 0.80. Since \(0.50<0.80\), draw \(X=1\).

On the third occasion, \(Z=1\) again. Since \(0.74<0.80\), draw \(X=1\) again. The sequence of updated values is therefore \(0,1,1\). Each update uses both the current conditioning value and a new random number; it does not simply carry forward a prediction from the first occasion.

This example isolates the update for \(X\): it takes the stated values of \(Z\) as inputs and does not claim anything about whether the pair of conditional models defines a coherent joint distribution. The important point here is that changes in the current conditioning information can change the conditional distribution, while stochastic draws can vary even when that information stays the same.

Worked Example: A Draw Is Not a Conditional Mean

Suppose a hypothetical missing continuous measurement \(Y\), in millimetres, has conditional distribution \(Y\mid Z\sim\operatorname{Uniform}(0,10)\) for a particular current value of \(Z\). The model’s conditional mean is 5 mm. For illustration, generate a draw by taking \(Y=10U\), where \(U\) is uniform between 0 and 1. If the random number is \(U=0.23\), then

$$ Y=10(0.23)=2.3\text{ mm}. $$

The inserted value is 2.3 mm, not the conditional mean of 5 mm. Another draw, such as \(U=0.81\), would give \(8.1\) mm. Both are possible under the stated distribution. The mean summarizes the distribution’s centre; it is not a replacement value that preserves the distribution of individual missing measurements.

Why Prediction-Only Insertion Loses Variation

The difference can be stated precisely. Let \(Y\) be a missing value and \(Z\) the conditioning information. Suppose the conditional distribution has a finite mean and variance. A stochastic update draws \(Y\) from that conditional distribution. A prediction-only update instead inserts \(m(Z)=E(Y\mid Z)\). The conditional variance of the stochastic value is, by definition, \(\operatorname{Var}(Y\mid Z)\); the conditional variance of the prediction-only value is zero because \(m(Z)\) is fixed once \(Z\) is known.

The law of total variance makes the consequence clear. For a stochastic draw, total variance includes both variation in conditional means across different \(Z\) values and variation around each conditional mean. For prediction-only insertion, only the first component remains.

$$ \operatorname{Var}(Y) = \operatorname{Var}\!\left(E(Y\mid Z)\right) + E\!\left[\operatorname{Var}(Y\mid Z)\right]. $$

If each missing value is replaced by \(E(Y\mid Z)\), its variation across cases reflects \(\operatorname{Var}(E(Y\mid Z))\), but it has no within-\(Z\) conditional variation. The omitted component is \(E[\operatorname{Var}(Y\mid Z)]\), which is nonnegative and is positive whenever the conditional distribution has positive variance for some relevant values of \(Z\). Thus, except in the special case of zero conditional variance, mean insertion suppresses variation represented by the model.

For a categorical variable, the same idea appears in a different form. A conditional probability such as 0.70 is not a category label, and inserting it into a binary variable creates values outside its allowed set. Assigning the most probable category instead avoids invalid values, but it still discards uncertainty: when \(P(X=1\mid Z)=0.70\), always inserting 1 does not represent the model’s 0.30 probability of 0.

Diagnostics, Alternatives, and Limits

Randomness alone is not evidence that an update is working well. Review whether draws are on the correct scale, whether categorical values are allowable, and whether the conditional probabilities or distributions behave sensibly across relevant conditioning values. For example, a binary update should produce only 0s and 1s; a probability model should not yield probabilities below 0 or above 1. For a continuous variable, generated values should be plausible under the variable’s definition and the conditional model. These checks can reveal coding errors or gross model problems, although plausible-looking values do not establish that the model is correct.

A useful conceptual comparison is:

Update choiceWhat is inserted?Main consequence
Conditional drawA value drawn from the specified conditional distributionRepresents variation within that distribution
Conditional meanThe conditional expectationRemoves within-condition variation; may be invalid for categorical data
Conditional modeThe most probable category or valueChooses one most likely value but discards other possible outcomes

These alternatives can answer different descriptive or prediction questions, but they are not interchangeable as FCS updates. A conditional mean can be a useful summary or a prediction target; it does not, by itself, provide a stochastic imputation. A mode can give a single best category under a chosen loss function, but repeatedly using it can make the completed data overly concentrated. Stochastic conditional updates retain the conditional spread specified by the model, but they do not guarantee that the model is correctly specified or that all assumptions needed for a valid multiple-imputation analysis hold.

A further limitation is that a stochastic draw introduces variation according to the conditional distribution currently specified; it cannot account for uncertainty that the specified distribution itself leaves out. The details of how conditional models are estimated and how their uncertainty enters updates are distinct from the basic distinction between drawing a value and inserting a prediction. Likewise, random updates do not by themselves establish convergence, compatibility of conditional models, or validity of the missingness assumptions. Those are separate questions.

Common Mistakes

  • Inserting the probability as the value. If a binary model gives probability 0.70, entering 0.70 into a variable coded 0 or 1 is not a draw. Generate either 0 or 1 according to the stated probabilities.
  • Assuming a random draw must equal the conditional mean. One draw is a realization, not a summary. It may lie above or below the mean.
  • Thinking a stochastic update fixes a weak model. Randomness preserves the spread implied by the specified distribution; it cannot correct a wrong conditional relationship or an inappropriate distribution.
  • Replacing every missing categorical value with the most likely category. This disregards the other categories’ conditional probabilities. A mode may suit a classification task, but it is not equivalent to drawing from the conditional distribution.
  • Confusing variability with validity. A chain can generate varied values and still be based on an unsuitable conditional model or missing-data assumptions.
Key takeaway: A stochastic conditional update inserts a possible value drawn from the current conditional distribution. It does not insert the conditional mean, probability, or mode. The draw retains conditional variation represented by the model, but cannot compensate for misspecification or other unmet assumptions.

Check Your Understanding

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

  1. A binary conditional model gives \(P(X=1\mid Z)=0.25\). Is 0.25 the value to insert? If the uniform number is 0.18 and the rule is to set \(X=1\) when \(U<0.25\), what is the update?
  2. A missing numeric value has conditional mean 12 units and conditional variance 9 square units at a given \(Z\). What is the conditional standard deviation, and why does inserting 12 for every such case remove conditional variation?
  3. For a binary variable, the conditional probabilities are \(P(X=0\mid Z)=0.40\) and \(P(X=1\mid Z)=0.60\). What are the possible stochastic update values, and why is always inserting the mode not the same procedure?
  4. In a repeated update, the conditioning variable changes from \(Z=0\) to \(Z=1\), and the model’s probability of \(X=1\) changes from 0.20 to 0.80. State two reasons the next draw may differ from the earlier one.

Solutions. (1) No. The number 0.25 is the probability, not a possible binary value. Since \(0.18<0.25\), the update is \(X=1\). (2) The conditional standard deviation is \(\sqrt{9}=3\) units. Inserting 12 gives the same value for every case with that conditioning information, so the inserted values have zero variation conditional on \(Z\), rather than the model’s variance of 9 square units. (3) The possible values are 0 and 1, drawn with probabilities 0.40 and 0.60. Always inserting the mode would produce 1 every time and ignore the 0.40 probability assigned to 0. (4) The conditional distribution changed because \(Z\) changed, and the random number used for the draw may also differ. Either can change the resulting value.

Clinical Biostats