You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test-blocks.R contains a specification of the mice setup with two non-standard features.
a duplicate bmi is acceptable through blocks specification
variable hyp is not specified
The current policy is not very satisfying. Currently, where[, "hyp"] is set to FALSE, so hyp is not imputed. However, it is still a predictor for blocks B1, bmi and age, thus leading to missing data propagation.
A better policy might be inactivating any unmentioned variable j by
set method[j] to "" (we can always do that since j is not mentioned in the model)
set predictorMatrix[, j] to 0 (take j out as predictor)
leave predictorMatrix[j, ] untouched (so we can still which variables it would require to imputed)
leave where[, j] untouched
As 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?
The text was updated successfully, but these errors were encountered:
stefvanbuuren
changed the title
How should mice behave when variables are not specified through blocks or formulas
How should mice behave when variables are not specified in the model
Sep 13, 2023
After some discussions, I suggest the following NA-PROPAGATION policy:
We use NA-PROPAGATION by default (continuing the policy used in mice 3.0). The user sees 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.
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
bymethod[j]
to""
(we can always do that sincej
is not mentioned in the model)predictorMatrix[, j]
to0
(takej
out as predictor)predictorMatrix[j, ]
untouched (so we can still which variables it would require to imputed)where[, 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?The text was updated successfully, but these errors were encountered: