Open stefvanbuuren opened 1 year ago
After some discussions, I suggest the following NA-PROPAGATION policy:
NA
in the imputed data and becomes aware of a potential model specification problem (e.g. not imputing a variable used as a predictor). mice()
should offer two easy ways to solve the problem: "autoremove"
and "autoimpute"
. Both options would "magically" make the problem disappear. "autoremove"
removes any incomplete predictors from the imputation model,"autoimpute"
will impute any incomplete predictors.Note that these options are not yet implemented.
test-blocks.R
contains a specification of the mice setup with two non-standard features.bmi
is acceptable throughblocks
specificationhyp
is not specifiedThe current policy is not very satisfying. Currently,
where[, "hyp"]
is set to FALSE, sohyp
is not imputed. However, it is still a predictor for blocksB1
,bmi
andage
, thus leading to missing data propagation.Using c2da03c:
Created on 2023-09-13 with reprex v2.0.2
A better policy might be inactivating any unmentioned variable
j
by1) set
method[j]
to""
(we can always do that sincej
is not mentioned in the model) 2) setpredictorMatrix[, j]
to0
(takej
out as predictor) 3) leavepredictorMatrix[j, ]
untouched (so we can still which variables it would require to imputed) 4) leavewhere[, j]
untouchedAs a result,
j
is not imputed and is not a predictor anywhere. The policy might stimulate starting small (with a few variables, and gradually build up). Does this seem a good approach? Any downsides to it?