Why Mask Values That Are Already Known?
When a value is genuinely missing, its true value is unavailable, so its imputation error cannot be calculated directly. A masked-value diagnostic creates a test: temporarily hide some values that were observed, impute them as if they were missing, and compare the imputations with the values that were hidden. The comparison measures performance on those held-out observations, not automatically on all missing cases.
The procedure is useful only if the held-out values are kept out of the imputation process. If a value is hidden from the target column but remains available through a derived variable, a duplicate field, or a model-fitting step, the evaluation is contaminated by information leakage. The imputed value can then appear more accurate than it would be when the value is truly unknown.
For a target variable \(Y\), let \(R=1\) indicate that its value is observed and \(R=0\) that it is missing. Select a subset of cases with \(R=1\) for the holdout set. During the diagnostic, those target values are treated as unavailable, while the remaining observed data are used to run MICE. For each held-out case, the imputed value is then compared with its known \(Y\).
Designing a Valid Holdout Check
The implementation should reproduce the information available in the real imputation task. Hide the selected target values before fitting the imputation models or starting the chains. Keep available predictors as they would be available for genuinely missing cases, but also hide any copies or transformations that reveal the held-out values. Then run MICE and save the imputations for the masked cells. If the imputation procedure produces \(m\) completed versions, calculate a diagnostic for each imputation or summarize the \(m\) predictions for each held-out case, stating which approach is used.
A random holdout among observed values estimates performance for the observed-value population from which that holdout was sampled. To learn whether accuracy differs across important groups, the holdout can also be stratified by relevant predictors or missingness patterns. Sampling and analysis should respect the observational unit: if several records belong to the same person, for example, splitting individual records between fitting and holdout can leak person-specific information. Hold out at the person level when that matches the intended prediction task.
Generalizing the result to genuinely missing cases requires a substantive assumption. In a simple form, after conditioning on the predictors and other information used in the imputation, the distribution of \(Y\) among observed cases must be informative about its distribution among cases missing \(Y\). If the missing values arise from a different conditional distribution, an accuracy score computed on observed values need not represent accuracy for the missing ones. Masking observed values cannot by itself test whether that assumption holds; the hidden true values are known only for cases that were originally observed. This limitation is related to the standard concepts of MCAR, MAR, and MNAR from Missing Data.
Continuous Outcomes: Bias and Prediction Error
For a continuous target, let \(y_i\) be the held-out value for case \(i\), and let \(\tilde y_i\) be its imputed prediction. If several imputations are available, one possible point prediction is the mean of the imputed values for that case. For \(q\) held-out cases, the mean error, mean absolute error, and root mean squared error are:
Mean error describes signed average bias: positive values indicate overprediction on average under this definition of error. MAE and RMSE measure error magnitude in the units of \(Y\); RMSE gives relatively more weight to large errors because errors are squared before averaging. These are summaries of predictive performance on the particular holdout, not estimates of uncertainty for a final analysis coefficient.
Worked Example: Scoring Continuous Imputations
Suppose five hypothetical observed values of a laboratory measure, in units per litre, are hidden. Their known values are \(10, 12, 15, 18, 20\), and the corresponding single imputed predictions are \(11, 10, 16, 17, 23\). Assume the holdout values were excluded from model fitting and no information revealing them remained in the predictors.
The prediction errors \(\tilde y_i-y_i\) are \(1,-2,1,-1,3\). Therefore, mean error is \((1-2+1-1+3)/5=2/5=0.400\) units per litre. The positive mean error indicates a slight average overprediction in this small holdout.
The absolute errors sum to \(1+2+1+1+3=8\), so \(\text{MAE}=8/5=1.60\) units per litre. The squared errors sum to \(1+4+1+1+9=16\), giving \(\text{RMSE}=\sqrt{16/5}=\sqrt{3.2}=1.789\) units per litre. Both magnitude scores show typical error size; neither establishes how accurately all genuinely missing values will be imputed.
The use of signed errors in mean error explains why an overall bias summary can look reassuring even when errors are substantial: positive and negative errors cancel. MAE avoids that cancellation, while RMSE makes a few large discrepancies more prominent. Reporting more than one summary can therefore reveal behavior that a single number conceals.
Binary Outcomes: Probabilities and Classifications
For a binary target, assess imputed probabilities when the imputation output supports them. Let \(y_i\) equal 1 for the event of interest and 0 otherwise, and let \(p_i\) be the imputed probability of that event. The Brier score is the average squared difference between the predicted probability and the observed outcome. Smaller values indicate better probability predictions on the holdout; a score of zero means perfect predictions for those cases.
A threshold can also convert probabilities into classifications. At a threshold of 0.50, for example, classify a case as positive if \(p_i\geq 0.50\), and negative otherwise. Classification accuracy is the number classified correctly divided by \(q\). It depends on the chosen threshold and does not measure how close the predicted probabilities are to the observed outcomes. Always report the threshold when reporting classification accuracy.
Worked Example: Brier Score and Threshold Accuracy
Consider ten hypothetical held-out binary outcomes. Four are positive, with predicted probabilities \(0.90, 0.75, 0.60, 0.40\). Six are negative, with probabilities \(0.40, 0.30, 0.20, 0.10, 0.10, 0.05\). Assume that each probability was produced without using that case's held-out outcome.
For the four positive cases, the squared errors are \((1-0.90)^2=0.0100\), \((1-0.75)^2=0.0625\), \((1-0.60)^2=0.1600\), and \((1-0.40)^2=0.3600\). They sum to \(0.5925\). For the six negative cases, the squared errors are \(0.40^2=0.1600\), \(0.30^2=0.0900\), \(0.20^2=0.0400\), \(0.10^2=0.0100\), \(0.10^2=0.0100\), and \(0.05^2=0.0025\). They sum to \(0.3125\).
Thus, \(\text{Brier}=(0.5925+0.3125)/10=0.905/10=0.0905\). At a threshold of 0.50, three of the four positive cases are classified positive; the case with probability 0.40 is classified negative. All six negative cases are also classified negative. The accuracy is therefore \((3+6)/10=0.900\), or 9/10 correct. These results describe this small holdout and do not show that future classifications will be equally accurate or that the probabilities are reliable in other data.
A score should be interpreted in context. A Brier score averages probability errors over the observed event mix in the holdout, so comparisons across populations with different event prevalences require care. A threshold-based score additionally reflects the decision threshold. Neither measure removes the need to examine whether the holdout represents the cases for which imputations are needed.
Check Errors Within Groups
Overall metrics can conceal systematic errors in subgroups. Stratifying the holdout by a predictor, outcome range, or relevant missingness pattern can show whether the imputation systematically overpredicts for one group and underpredicts for another. Subgroup summaries are most useful when each group has enough held-out cases to make the pattern interpretable; sparse groups can produce highly unstable scores.
Worked Example: Opposing Subgroup Errors
Suppose four hypothetical held-out measurements, in milligrams per litre, come from two age groups. In Group A, the known values are 10 and 12, and the imputations are 12 and 14. In Group B, the known values are 20 and 22, and the imputations are 18 and 20. The signed errors are \(2,2,-2,-2\).
Across all four cases, mean error is \((2+2-2-2)/4=0\) milligrams per litre. That might seem to indicate no bias. But Group A's mean error is \((2+2)/2=2\) milligrams per litre, while Group B's is \((-2-2)/2=-2\) milligrams per litre. Overall MAE is \((2+2+2+2)/4=2\) milligrams per litre, and RMSE is \(\sqrt{(4+4+4+4)/4}=2\) milligrams per litre. The zero overall mean error results from cancellation, not perfect prediction; the stratified summaries expose the opposing errors.
Diagnostics, Alternatives, and Limitations
A masked-value check is informative only when its design and its results are reviewed, not just when a score is calculated. Examine the distribution of errors and plots of imputed against known values; look for unusually large errors, systematic shifts, and patterns across predictors. Compare scores across reasonable holdout splits or folds to see whether conclusions depend on a particular partition. If a few cases dominate RMSE, inspect them for data or model problems rather than relying on the overall score alone.
When the procedure generates multiple imputations, do not treat all \(m\) imputations of every held-out case as independent test cases. They are repeated draws for the same underlying case. A clear option is to compute a score for each imputed data set and summarize how those scores vary, or to average predictions within case and report that the resulting score assesses point prediction. Averaging predictions and then scoring them does not assess the full spread of imputations. For uncertainty about performance, resampling should respect clustering and the holdout design.
| Approach | What it can assess | Main limitation |
|---|---|---|
| Masked-value validation | Imputation performance against known values excluded from fitting | May not represent genuinely missing cases |
| Internal observed-versus-imputed comparisons | Distributional differences between observed and imputed entries | Does not provide known truths for genuinely missing values |
| Simulation with known values | Performance under specified data-generating and missingness mechanisms | Conclusions depend on how well the simulation reflects the application |
Internal observed-versus-imputed comparisons can reveal distributional discrepancies, but they are not a substitute for known-value validation: observed and missing cases can differ. Simulation can measure accuracy where the truth is generated and known, but may not reproduce the real study. Masked-value validation is a practical empirical check, not a guarantee of accuracy, a test for MNAR, or proof that the imputation model is correctly specified. It also cannot assess values outside the support of the observed data if no held-out observations represent those regions.
The diagnostic matters because it tests the imputation procedure against observations whose truth is available, making some failures visible before imputations are used in an analysis. Its strongest use is targeted: identify where predictive performance is poor, whether errors differ across important groups, and whether the holdout design supports the intended conclusion. It should be considered alongside distributional checks and substantive knowledge rather than treated as a single pass-or-fail test.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- Why must held-out values be hidden before fitting the imputation models rather than only removed from the final comparison?
- For true values \(4,8\) and predictions \(6,7\), calculate mean error, MAE, and RMSE.
- For binary outcomes \(1,0,1\) and probabilities \(0.8,0.4,0.3\), calculate the Brier score and accuracy at threshold 0.50.
- What does a zero overall mean error fail to reveal when two subgroups have mean errors of \(+3\) and \(-3\)?
- State one condition needed to use masked-value results as evidence about imputations for genuinely missing cases, and one limitation of the check.
Solutions. (1) If a held-out value affects model fitting, a predictor, or another part of the imputation procedure, information from the answer has leaked into its prediction; the diagnostic will be optimistic. (2) Errors are \(6-4=2\) and \(7-8=-1\). Mean error is \((2-1)/2=0.500\), MAE is \((2+1)/2=1.50\), and RMSE is \(\sqrt{(2^2+(-1)^2)/2}=\sqrt{2.5}=1.581\), in the units of the measured variable. (3) The squared errors are \((1-0.8)^2=0.04\), \((0-0.4)^2=0.16\), and \((1-0.3)^2=0.49\), so the Brier score is \(0.69/3=0.230\). At threshold 0.50, the predictions classify the cases as positive, negative, negative, so two of three are correct and accuracy is \(2/3=0.667\). (4) The opposing subgroup errors may cancel to zero overall even though both groups have systematic errors; subgroup scores are needed to expose that pattern. (5) One needs held-out observed cases to be informative about genuinely missing cases, for example after conditioning on relevant predictors. The diagnostic cannot verify that condition from masked observations alone and cannot directly measure errors for values that are genuinely missing.