From Conditional Models to a Sweep
Fully Conditional Specification (FCS) treats imputation as a sequence of conditional modeling steps. A sweep is one pass through the variables designated for imputation: for each variable in the chosen order, fit its conditional model and use that model to update its missing values. The key operational detail is that this is a sequence. Once a variable has been updated, its current values are available to the models fitted later in the same sweep.
This tutorial focuses on carrying out that pass. It does not decide which predictors belong in each model or which variable order is best; those are separate modeling choices. To make the mechanics explicit, each example states the models or predictors being used.
The usual statistical requirements still matter: a conditional model must be suitable for the target’s scale and distribution, there must be enough observed target values to fit it, and the resulting predictions must be meaningful for the data. The inferential validity of the overall imputation procedure also depends on the missingness assumptions and model adequacy; a sweep by itself does not establish either. These are not guaranteed merely because the algorithm completes without an error.
The Order of Operations
Suppose the incomplete variables are \(A\) and \(B\), and the specified order is \(A\) then \(B\). Let \(D^{(0)}\) denote the current dataset state at the start of the sweep. The first update fits a model for \(A\) and produces \(D^{(1)}\); the second fits a model for \(B\) using \(D^{(1)}\), producing \(D^{(2)}\). Thus a sweep is a composition of updates, not a collection of updates all based on the same starting snapshot.
Here \(U_A\) and \(U_B\) stand for the respective fit-and-update operations, including whatever update rule the implementation uses. This notation is a bookkeeping device, not a claim that the update functions are fixed or that the sequence must converge. Reversing the order generally changes which current values are presented to each model, so it can produce a different sweep.
For every incomplete variable, the algorithm has a current value available where needed. At this point, no update in the present sweep has yet been made.
Use cases with an observed value of that target to estimate its conditional model, with the predictors and model form specified for the target.
Use the fitted model’s update rule to replace the current missing entries for that target. Other variables are not the target of this update.
Fit and apply the next target model using the state now available, including updates already made in this sweep.
The model type depends on the target: a continuous target may call for a regression model, while a binary target may call for a binary-response model. The sweep structure is the same in either case. A fitted mean or probability is not automatically the imputed value; the procedure’s update rule determines how fitted distributions or predictions are turned into updated entries.
Worked Example: A Complete Two-Variable Binary Sweep
Consider this hypothetical dataset with two binary variables, \(A\) and \(B\). The order is \(A\) then \(B\). A question mark marks a missing value; the entries in parentheses are the current values available at the start of the sweep for missing \(B\). For this hand calculation, each conditional model estimates a separate Bernoulli probability for each value of its binary predictor. The update draws a binary value using the fitted probability and the stated uniform number.
| Row | A | B at sweep start |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 0 | 0 |
| 3 | missing | 1 |
| 4 | 1 | 0 |
| 5 | missing | missing (0) |
| 6 | 0 | missing (1) |
| 7 | 0 | 1 |
| 8 | 1 | 0 |
Update \(A\) using \(B\). Fit the conditional probabilities from rows with observed \(A\). Among those rows with \(B=1\), rows 1, 6, and 7 have \(A=1,0,0\), respectively. Therefore,
Among observed-\(A\) rows with \(B=0\), rows 2, 4, and 8 have \(A=0,1,1\). Thus,
Row 3 has missing \(A\) and \(B=1\). With a uniform draw \(u=0.20\), set \(A=1\) if \(u\) is less than the fitted probability; since \(0.20<1/3\), row 3 receives \(A=1\). Row 5 has missing \(A\) and current \(B=0\); with \(u=0.80\), it receives \(A=0\), since \(0.80\) is not less than \(2/3\). The updated \(A\) values are now available for the next model.
Update \(B\) using the current \(A\). Fit this model on rows with observed \(B\): rows 1, 2, 3, 4, 7, and 8. Row 3 is included with its newly updated \(A=1\). Among these rows with \(A=1\), \(B=1\) occurs twice (rows 1 and 3) among four cases (rows 1, 3, 4, and 8). Among cases with \(A=0\), \(B=1\) occurs once (row 7) among two cases (rows 2 and 7). Hence,
Rows 5 and 6 have missing \(B\), and their current \(A\) values are both 0. Using uniform draws \(u=0.20\) for row 5 and \(u=0.70\) for row 6, the first gives \(B=1\) and the second gives \(B=0\). One full sweep is complete: row 3 has updated \(A=1\), row 5 has \(A=0,B=1\), and row 6 has \(A=0,B=0\). The calculations assume the specified group-probability models are an adequate description for this illustration; the small group counts would make them unstable in a serious analysis.
Continuous Targets and Model Application
The same bookkeeping applies when a conditional model is continuous. The following calculation shows how a simple linear conditional model is fitted. For clarity, it focuses on the fitted conditional mean; a complete imputation procedure must also specify how its update rule accounts for uncertainty and residual variation.
Worked Example: Fitting a Conditional Mean for a Continuous Variable
In a hypothetical dataset, \(Y\) is incomplete and \(X\) is fully observed. The four cases with observed \(Y\) are \((X,Y)=(0,2),(1,4),(2,5),(3,7)\). Specify the linear model \(Y=\beta_0+\beta_1X+\varepsilon\), with errors having mean zero conditional on \(X\) and constant variance for the usual least-squares interpretation. These assumptions are imposed for the calculation, not established by four observations.
The observed-case means are \(\bar{x}=1.5\) and \(\bar{y}=4.5\). The least-squares slope and intercept are
The fitted conditional mean is \(\hat{Y}=2.1+1.6X\). If a missing-\(Y\) case has \(X=1.5\), its fitted mean is \(2.1+(1.6)(1.5)=4.5\). If another has \(X=2.5\), its fitted mean is \(2.1+(1.6)(2.5)=6.1\). These are fitted means, not a demonstration that the completed data should simply use those values as imputations. A real update must follow the specified imputation rule, and model adequacy should be checked using the available observed data and the imputation output.
This distinction is important in a sweep: fitting the conditional model is one operation, applying its update rule is another. Merely computing predictions for missing cases does not, by itself, describe a full MICE update. The binary example made the update rule explicit with Bernoulli draws; the linear calculation isolates the fitting arithmetic so that the distinction is visible.
Auditing a Sweep and Recognizing Failure
A useful audit records, for every target, the model fitted, the cases used to fit it, the predictors’ current values, and the values produced by the update. This makes it possible to detect errors that a final completed dataset might conceal. For example, a model fitted for \(B\) before the \(A\) update has been applied is not following an \(A\)-then-\(B\) sweep. Nor is a model for \(B\) using newly updated \(A\) in some rows and stale values in others unless that is explicitly part of the defined procedure.
Common warning signs include failed model fitting, separation or extremely sparse categories for a binary target, predictions outside the permitted range, implausible values for a continuous target, and updates that are identical for every missing case despite meaningful predictor differences. These signs call for investigation, not automatic acceptance of the output. They may reflect a misspecified model, insufficient information, coding errors, or a poor fit between the model and the data.
A sweep is also not the same as fitting one joint model for all variables. FCS fits separate conditional models and applies them in sequence; a joint-model approach specifies a joint distribution directly. Nor is a sweep the same as pooling: pooling combines estimates and uncertainty from multiple completed datasets, whereas a sweep is an operation within the iterative construction of imputed values. Rubin’s Rules concern the former, not the mechanics of this single pass.
A correctly executed sweep is still only one pass. Its completion is not evidence that the chain has stabilized, that the conditional models are mutually coherent, or that the imputations support valid inference. Those questions require assessment beyond the arithmetic and bookkeeping of a single sweep. In practice, save enough information to reproduce each update and inspect both model diagnostics and the resulting values.
Worked Example: Checking the Update Order
Suppose a sweep is ordered \(C\), then \(D\), where both variables are incomplete. At the start of the pass, a row has current \(C=0\) and missing \(D\). The \(C\) update assigns \(C=1\) for that row. When fitting the conditional model for \(D\), which value of \(C\) belongs to the row’s current state?
The value is \(C=1\), because the \(C\) update has already been applied. If the \(D\) model uses \(C\), it must use the updated value in this row, subject to the specified model and fitting data. Using \(C=0\) would use the start-of-sweep snapshot and would not implement the stated \(C\)-then-\(D\) sequence. This check concerns the sweep’s data flow; it does not determine whether \(C\) is a suitable predictor for \(D\).
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- A sweep is ordered \(R\) then \(S\). After updating missing \(R\), which state of \(R\) should the \(S\) update use?
- A binary conditional model estimates \(\widehat{P}(T=1\mid W=1)=0.40\). Under the update rule that assigns 1 when \(u\) is less than this probability, what value is assigned for \(u=0.25\), and for \(u=0.65\)?
- A fitted linear model gives \(\hat{Y}=3+2X\). What fitted mean does it give at \(X=4\), and why is that not necessarily the imputed value?
- What is the main difference between a conditional update sweep and pooling estimates with Rubin’s Rules?
Solutions. (1) Use the current, updated \(R\) values: the \(S\) update follows the \(R\) update in the specified sequence. (2) For \(u=0.25\), \(0.25<0.40\), so assign \(T=1\); for \(u=0.65\), the inequality does not hold, so assign \(T=0\). (3) The fitted mean is \(3+(2)(4)=11\). It is a model prediction, not necessarily the imputed value, because the imputation update rule may account for uncertainty and residual variation. (4) A sweep sequentially updates missing values using conditional models; Rubin’s Rules combine estimates and uncertainty across completed datasets.