Define a function that is a wrapper around imputation using mice and plotting the imputation paths and resulting values using ggmice.
Not quite perfect legends of the bar charts are an issue that needs addressing but this is something that can be addressed in due course as a separate issue (to be created).
Extract the legends from individual plots and add them to the end of each row, see the cowplot shared +legends article for pointers on how to do this. Should +ideally also get the fill colours to align with those used by ggmice.
Imputation isn't a panacea
The imputation of bta_u_classification looks off to based on the following graph.
Whilst it is possible to fit various models I would NOT pay any attention to them at the moment as they are likely wrong.
Caveat
I've noticed in reviewing this that the summary statistics for each imputation across methods (Predictive Mean Matching pmm / Classification and Regression Trees cart / Random Forest rf) are bizarely identical which surprised me. I have looked closely and can not yet work out why but that is something that will need investigating and fixing as there should be variation between the methods.
What is strange is that the summary plots show that there are differences between the imputed datasets. I can't quite see why the resulting data sets that are produced in $imputed are the same though (the plots take the $mids objects directly).
Define a function that is a wrapper around imputation using
mice
and plotting the imputation paths and resulting values usingggmice
.Not quite perfect legends of the bar charts are an issue that needs addressing but this is something that can be addressed in due course as a separate issue (to be created).
Extract the legends from individual plots and add them to the end of each row, see the cowplot shared +legends article for pointers on how to do this. Should +ideally also get the
fill
colours to align with those used byggmice
.Imputation isn't a panacea
The imputation of
bta_u_classification
looks off to based on the following graph.Whilst it is possible to fit various models I would NOT pay any attention to them at the moment as they are likely wrong.
Caveat
I've noticed in reviewing this that the summary statistics for each imputation across methods (Predictive Mean Matching
pmm
/ Classification and Regression Treescart
/ Random Forestrf
) are bizarely identical which surprised me. I have looked closely and can not yet work out why but that is something that will need investigating and fixing as there should be variation between the methods.What is strange is that the summary plots show that there are differences between the imputed datasets. I can't quite see why the resulting data sets that are produced in
$imputed
are the same though (the plots take the$mids
objects directly).