R build status CRAN status lifecycle Last-changedate


rMIDAS is an R package for accurate and efficient multiple imputation using deep learning methods. The package provides a simplified workflow for imputing and then analyzing data:

rMIDAS is based on the Python class MIDASpy.

Efficient handling of large data

rMIDAS also incorporates several features to streamline and improve the the efficiency of multiple imputation analysis:

Background on method

For more information on the underlying multiple imputation method, MIDAS, see:

Lall, Ranjit, and Thomas Robinson. 2020. “Applying the MIDAS Touch: How to Handle Missing Values in Large and Complex Data.” APSA Preprints. https://doi.org/10.33774/apsa-2020-3tk40-v3


rMIDAS is now available on CRAN. To install the package in R, you can use the following code:


To install the latest development version, please use the following code:

# install.packages("devtools")

Note that rMIDAS uses the reticulate package to interface with Python. Users must have Python 3.5 - 3.8 installed in order to run MIDAS (Python 3.9 is not yet supported). rMIDAS will automatically try to set up a Python configuration unless users specify their own version using set_python_env() (examples below). Setting a custom Python install must be performed before training or imputing data occurs:


# Point to a Python binary
set_python_env(python = "path/to/python/binary")

# Or point to a virtualenv binary
set_python_env(python = "virtual_env", type = "virtualenv")

# Or point to a condaenv, where conda can be supplied to choose a specific executable
set_python_env(python = "conda_env", type = "condaenv", conda = "auto")

# Now run rMIDAS::train() and rMIDAS::complete()...

Vignettes (including example)

rMIDAS is packaged with two vignettes:

  1. vignette("imputation_demo", "rMIDAS") demonstrates the basic workflow and capacities of rMIDAS
  2. vignette("custom_python_versions", "rMIDAS") provides detailed guidance on configuring Python binaries and environments, including some troubleshooting tips

Getting help

rMIDAS is still in development, and we may not have caught all bugs. If you come across any difficulties, or have any suggestions for improvements, please raise an issue here.