Code to generate and test methods for multiple imputation