-
Notifications
You must be signed in to change notification settings - Fork 107
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block-wise imputation #175
Comments
An additional note. The lines 91-96 in the function
I think that the following change would fix the issue
|
Alexander, as you suspected, this is a bug. Thanks for catching this. In mis <- !r
mis[, setdiff(colnames(data), b)] <- FALSE
data[mis] <- NA The bug ignores imputed values in variables outside the blocks when using multivariate imputation. It happens when using block-wise imputation with multivariate missing data. My mistake was in interchanging the roles of the arguments in |
Thank you for the fix. |
Hi Stef,
I tried the functionality of block-wise imputation. I used your example with the
"jomoImpute"
imputation method. My syntax is as follows (only slightly adapted from the manual)So, I want to inpute
bmi
,chl
andhyp
(say X1, X2, X3) in a block andage
(say Z) based on a single conditional model. My understanding is that I want to impute the first block based on the distribution P(X1, X2, X3|Z) and age based on P(Z|X1,X2,X3). I played a bit with the source code (which is herehttps://github.com/stefvanbuuren/mice/blob/master/R/mice.impute.jomoImpute.R
However, it seems the for imputing X=(X1,X2,X3), the original data
data
is used and not the updated values of Z. Is this a bug or is this by intention implemented in this way?Best,
Alexander
The text was updated successfully, but these errors were encountered: