mice icon indicating copy to clipboard operation
mice copied to clipboard

monotone missingness: not all values imputed in first step of random draws

Open sff06 opened this issue 2 years ago • 0 comments

I am following suggestions of the book of van Buuren (2018), p. 114f, to first impute (a few) single missing values that destroy monotone missingness pattern by a simple random draw before imputing values that follow monotone missingness. Applying the first step (single draws) with the code from the book adapted to my data and variables does not impute each of those singles values.

In case I have done something wrong, here is my code:

dataframe "datitems" contains all items that have single missing values that destroy monotone missingness pattern:

{ where <- make.where(datitems_impmonot, "none") where[c(63,222), "BB_19R"] <- TRUE where[c(63,222), "BB_20"] <- TRUE where[c(63,222), "BB_21"] <- TRUE where[c(63,222), "BB_22R"] <- TRUE where[c(63,222), "BB_23"] <- TRUE where[c(63,222), "BB_24"] <- TRUE where[c(63,222), "BB_25R"] <- TRUE where[c(63,222), "BB_26"] <- TRUE where[c(63,222), "BB_27R"] <- TRUE where[c(63,222), "BB_28"] <- TRUE where[c(63,222), "BB_29R"] <- TRUE where[c(63,222), "BB_30"] <- TRUE where[c(63,222), "BB_31R"] <- TRUE where[c(63,222), "BB_32"] <- TRUE where[c(63,167,222), "BB_33R"] <- TRUE where[c(63,222), "BB_34"] <- TRUE where[c(63,222), "BB_35R"] <- TRUE where[c(63,222), "BB_36"] <- TRUE where[130, "PTMR16"] <- TRUE where[40, "a1_34"] <- TRUE where[,"BB_33R"] } datitems_imp <- mice(datitems, where=where, m = 1, method = "sample", seed = 21980, maxit = 1, print = FALSE) datitems2 <- mice::complete(datitems_imp)

Checking, for instance,

datitems2$BB_19R[63]

still gives NA

Do you have any suggestions?

A workaround could be using: where <- make.where(datitems_impmonot, "missing") and transfering only sampled values to the original data set that initially destroyed monotone missingness pattern. Are there any objections to this workaround?

Thank you!

Best Stanley

sff06 avatar May 31 '22 11:05 sff06