Last updated on 2021-07-20 by Julie Josse, Nicholas Tierney, Nathalie Vialaneix (r-miss-tastic team)

Missing data are very frequently found in datasets. Base R provides a few options to handle them using computations that involve only observed data (`na.rm = TRUE`

in functions `mean`

, `var`

, ... or `use = complete.obs|na.or.complete|pairwise.complete.obs`

in functions `cov`

, `cor`

, ...). The base package stats also contains the generic function `na.action`

that extracts information of the `NA`

action used to create an object.

These basic options are complemented by many packages on CRAN, which we structure into main topics:

- Exploration of missing data
- Likelihood based approaches
- Single imputation
- Multiple imputation
- Weighting methods
- Specific types of data
- Specific application fields

In addition to the present task view, this reference website on missing data might also be helpful.

If you think that we missed some important packages in this list, please contact the maintainer.

*Manipulation of missing data*is implemented in the packages sjmisc and sjlabelled. memisc also provides defineable missing values, along with infrastruture for the management of survey data and variable labels.*Missing data patterns*can be identified and explored using the packages mi, wrangle, DescTools, dlookr and naniar.*Graphics that describe distributions and patterns of missing data*are implemented in VIM (which has a Graphical User Interface, VIMGUI, currently archived on CRAN) and naniar (which abides by tidyverse principles).*Tests of the MAR assumption (versus the MCAR assumption):*RBtest proposes a regression based approach to test the missing data mechanism and samon performs sensitivity analysis in clinical trials to check the relevance of the MAR assumption.*Evaluation*with simulations can be performed using the function`ampute`

of mice.

*Methods based on the Expectation Maximization (EM) algorithm*are implemented in norm (using the function`em.norm`

for multivariate Gaussian data), norm2 (using the function`emNorm`

), in cat (function`em.cat`

for multivariate categorical data), in mix (function`em.mix`

for multivariate mixed categorical and continuous data). These packages also implement*Bayesian approaches*(with Imputation and Posterior steps) for the same models (functions`da.`

XXX for`norm`

,`cat`

and`mix`

) and can be used to obtain imputed complete datasets or multiple imputations (functions`imp.`

XXX for`norm`

,`cat`

and`mix`

), once the model parameters have been estimated. imputeR is a Multivariate Expectation-Maximization (EM) based imputation framework that offers several different algorithms, including Lasso, tree-based models or PCA. In addition, TestDataImputation implements imputation based on EM estimation (and other simpler imputation methods) that are well suited for dichotomous and polytomous tests with item responses.*Full Information Maximum Likelihood*(also known as "direct maximum likelihood" or "raw maximum likelihood") is available in lavaan (and in its extension semTools), OpenMx and rsem, for handling missing data in structural equation modeling.*Bayesian approaches*for handling missing values in model based clustering with variable selection is available in VarSelLCM. The package also provides imputation using the posterior mean.*Missing values in mixed-effect models and generalized linear models*are supported in the packages mdmb, icdGLM and JointAI, the last one being based on a Bayesian approach. brlrmr also handles MNAR values in response variable for logistic regression using an EM approach. ui implements uncertainty intervals for linear and probit regressions when the outcome is missing not at random.*Missing data in item response models*is implemented in TAM, mirt and ltm.*Robust*covariance estimation is implemented in the package GSE. Robust location and scatter estimation and robust multivariate analysis with missing data are implemented in rrcovNA.

- The simplest method for missing data imputation is
*imputation by mean*(or median, mode, ...). This approach is available in many packages among which ForImp and Hmisc that contain various proposals for imputing with the same value all missing instances of a variable. *k-nearest neighbors*is a popular method for missing data imputation that is available in many packages including impute, VIM, GenForImp and yaImpute (with many different methods for kNN imputation, including a CCA based imputation). wNNSel implements a kNN based method for imputation in large dimensional datasets. isotree uses a similar approach that is based on similarities between samples to impute missing data with isolation forests.*hot-deck*imputation is implemented in hot.deck, FHDI and VIM (function`hotdeck`

). StatMatch uses hot-deck imputation to impute surveys from an external dataset. impimp also uses the notion of "donor" to impute a set of possible values, termed "imprecise imputation".*Other regression based imputations*are implemented in VIM (linear regression based imputation in the function`regressionImp`

). In addition, simputation is a general package for imputation by any prediction method that can be combined with various regression methods, and works well with the tidyverse. WaverR imputes data using a weighted average of several regressions. iai tunes optimal imputation based on knn, tree or SVM.*Based on random forest*in missForest with a faster version in missRanger.*Based on copula*in CoImp and in sbgcop (semi-parametric Bayesian copula imputation). The latter supports multiple imputation.*PCA/Singular Value Decomposition/matrix completion*is implemented in the package missMDA for numerical, categorical and mixed data. Heterogeneous missingness in a high-dimensional PCA is also addressed in primePCA. softImpute contains several methods for iterative matrix completion, as well as filling, rsparse and denoiseR for numerical variables, mimi that uses low rank assumptions to impute mixed datasets, and ECLRMC performs ensemble correlation based low rank matrix completion that accounts for correlation among samples. The package pcaMethods offers some Bayesian implementation of PCA with missing data.*NIPALS*(based on SVD computation) is implemented in the packages mixOmics (for PCA and PLS), ade4, nipals and plsRglm (for generalized model PLS). As a generalization, tensorBF implements imputation in 3-way tensor data. ROptSpace proposes a matrix completion method under low-rank assumption and collective matrix factorization for imputation using Bayesian matrix completion for groups of variables (binary, quantitative, Poisson). Imputation for groups is also available in missMDA in the function`imputeMFA`

.*Imputation for non-parametric regression by wavelet shrinkage*is implemented in CVThresh using solely maximization of the h-likelihood.- mi and VIM also provide diagnostic plots to
*evaluate the quality of imputation.*

Some of the above mentioned packages can also handle multiple imputations.

- Amelia implements Bootstrap multiple imputation using EM to estimate the parameters, for quantitative data it imputes assuming a Multivariate Gaussian distribution. In addition, AmeliaView is a GUI for Amelia, available from the Amelia web page. NPBayesImputeCat also implements multiple imputation by joint modelling for categorical variables with a Bayesian approach.
- mi, mice and smcfcs implement multiple imputation by Chained Equations. smcfcs extends the models covered by the two previous packages. miceFast provides an alternative implementation of mice imputation methods using object oriented style programming and C++. miceMNAR imputes MNAR responses under Heckman selection model for use with mice. bootImpute performs bootstrap based imputations and analyses of these imputations to use with mice or smcfcs. miceRanger performs multiple imputation by chained equations using random forests.
- missMDA implements multiple imputation based on SVD methods.
- hot.deck implements hot-deck based multiple imputation.
*Multilevel imputation*: Multilevel multiple imputation is implemented in hmi, jomo, mice, miceadds, micemd, mitml, and pan.- Qtools and miWQS implement multiple imputation based on quantile regression.
- lodi implements the imputation of observed values below the limit of detection (LOD) via censored likelihood multiple imputation (CLMI).
- BaBooN implements a Bayesian bootstrap approach for discrete data imputation that is based on Predictive Mean Matching (PMM).
- accelmissing provides multiple imputation with the zero-inflated Poisson lognormal model for missing count values in accelerometer data.

In addition, mitools provides a generic approach to handle multiple imputation in combination with any imputation method. And NADIA provides a uniform interface to compare the performances of several imputation algorithms.

*Computation of weights*for observed data to account for unobserved data by*Inverse Probability Weighting (IPW)*is implemented in ipw. IPW is also used for quantile estimations and boxplots in IPWboxplot.*Doubly Robust Inverse Probability Weighted Augmented GEE Estimator with missing outcome*is implemented in CRTgeeDR.

*Longitudinal data / time series and censored data*: Imputation for time series is implemented in imputeTS and imputePSF. Other packages, such as forecast, spacetime, timeSeries, xts, prophet, stlplus or zoo, are dedicated to time series but also contain some (often basic) methods to handle missing data (see also TimeSeries). To help fill down missing values for time series, the padr and tsibble packages provide methods for imputing implicit missing values. Imputation of time series based on Dynamic Time Warping is implemented in DTWBI for univariate time series and in DTWUMI or in FSMUMI for multivariate ones. naniar also imputes data below the range for exploratory graphical analysis with the function`impute_below`

. TAR implements an estimation of the autoregressive threshold models with Gaussian noise and of positive-valued time series with a Bayesian approach in the presence of missing data. swgee implements a probability weighted generalized estimating equations method for longitudinal data with missing observations and measurement error in covariates based on SIMEX. icenReg performs imputation for censored responses for interval data. imputeTestbench proposes tools to benchmark missing data imputation in univariate time series. On a related topic, imputeFin handles imputation of missing values in financial time series using AR models or random walk.*Spatial data*: Imputation for spatial data is implemented in phylin using interpolation with spatial distance weights or kriging. gapfill is dedicated to satellite data. Geostatistical interpolation of data with irregular spatial support is implemented in rtop and in areal that estimates values for overlapping but incongruent polygon features. Estimation and prediction for spatio-temporal data with missing values is implemented in StempCens with a SAEM approach that approximates EM when the E-step does not have an analytic form.*Spatio-temporal data*: Imputation for spatio-temporal data is implemented in the package cutoffR using different methods as knn and SVD and in CircSpaceTime for circular data using kriging. Similarly, reddPrec imputes missing values in daily precipitation time series accross different locations.*Graphs/networks*: Imputation for graphs/networks is implemented in the package dils to impute missing edges. PST provides a framework for analyzing Probabilistic Suffix Trees, including functions for learning and optimizing VLMC (variable length Markov chains) models from sets of individual sequences possibly containing missing values. missSBM imputes missing edges in Stochastic Block models and cassandRa predicts possible missing links with different stochastic network models.*Imputation for contingency tables*is implemented in lori that can also be used for the analysis of contingency tables with missing data.*Imputation for compositional data (CODA)*is implemented in in zCompositions (various imputation methods for zeros, left-censored and missing data).*Imputation for diffusion processes*is implemented in DiffusionRimp by imputing missing sample paths with Brownian bridges.*Imputation for meta-analyses*of binary outcomes is provided in metasens.- experiment handles missing values in experimental design such as randomized experiments with missing covariate and outcome data, matched-pairs design with missing outcome.
- cdparcoord provides tools to handle missing values in parallel coordinates settings.
- dejaVu performs multiple imputation of recurrent event data based on a negative binomial regression model.

*Genetics*: SNPassoc provides functions to visualize missing data in the case of SNP studies (genetics). Analyses of Case-Parent Triad and/or Case-Control Data with SNP haplotypes is implemented in Haplin, where missing genotypic data are handled with an EM algorithm. FamEvent and snpStats implement imputation of missing genotypes, respectively with an EM algorithm and a nearest neighbor approach. Imputation for genotype and haplotype is implemented in alleHap using solely deterministic techniques on pedigree databases; imputation of missing genotypes is also implemented in QTLRel that contains tools for QTL analyses. Tools for Hardy-Weinberg equilibrium for bi- and multi-allelic genetic marker data are implemented in HardyWeinberg, where genotypes are imputed with a multinomial logit model. StAMPP computes genomic relationship when SNP genotype datasets contain missing data and PSIMEX computes inbreeding depression or heritability on pedigree structures affected by missing paternities with a variant of the SIMEX algorithm.*Genomics*: Imputation for dropout events (*i.e.*, under-sampling of mRNA molecules) in single-cell RNA-Sequencing data is implemented in DrImpute and Rmagic. RNAseqNet uses hot-deck imputation to improve RNA-seq network inference with an auxiliary dataset.*Epidemiology*: idem implements a procedure for comparing treatments in clinical trials with missed visits or premature withdrawal. InformativeCensoring implements multiple imputation for informative censoring. pseval evaluates principal surrogates in a single clinical trial in the presence of missing counterfactual surrogate responses. sievePH implements continuous, possibly multivariate, mark-specific hazard ratio with missing values in multivariate marks using an IPW approach.*Causal inference*: Causal inference with interactive fixed-effect models is available in gsynth with missing values handled by matrix completion. MatchThem matches multiply imputed datasets using several matching methods, and provides users with the tools to estimate causal effects in each imputed datasets. grf offers treatment effect estimation with incomplete confounders and covariates under modified unconfoundedness assumptions.*Scoring*: Basic methods (mean, median, mode, ...) for imputing missing data in scoring datasets are proposed in scorecardModelUtils.*Preference models*: Missing data in preference models are handled with a*Composite Link*approach that allows for MCAR and MNAR patterns to be taken into account in prefmod.*Health economy*: missingHE implements models for health economic evaluations with missing outcome data.*Administrative records / Surveys*: fastLink provides a Fellegi-Sunter probabilistic record linkage that allows for missing data and the inclusion of auxiliary information.*Regression and classification*: eigenmodel handles missing values in regression models for symmetric relational data. randomForest, grf and StratifiedRF handle missing values in predictors in various random forest based methods. mipred handles prediction in generalized linear models and Cox prediction models with multiple imputation of predictors. misaem handles missing data in linear and logistic regression and allows for model selection. psfmi provides a framework for model selection for various linear models in multiply imputed datasets. naivebayes provides an efficient implementation of the naive Bayes classifier in the presence of missing data. plsRbeta implements PLS for beta regression models with missing data in the predictors. lqr provides quantile regression estimates based on various distributions in the presence of missing values and censored data.*Clustering*biclustermd handles missing data in biclustering. RMixtComp and mixture fit various mixture models in the presence of missing data.*Tests*for two-sample paired missing data are implemented in robustrank.- robustrao computes the Rao-Stirling diversity index (a well-established bibliometric indicator to measure the interdisciplinarity of scientific publications) with data containing uncategorized references.

- Task view: TimeSeries
- Bioconductor package: impute
- Bioconductor package: snpStats
pcaMethods - Bioconductor package: mixOmics
- Amelia II: A Program for Missing Data
- A resource website on missing data

a month ago by Aurélie Siberchicot

Analysis of Ecological Data: Exploratory and Euclidean Methods in Environmental Sciences

4 years ago by Nathan Medina-Rodriguez

Allele Imputation and Haplotype Reconstruction from Pedigree Databases

6 years ago by Florian Meinfelder

Bayesian Bootstrap Predictive Mean Matching - Multiple and Single Imputation for Discrete Data

2 years ago by Chris Terry

Finds Missing Links and Metric Confidence Intervals in Ecological Bipartite Networks

9 years ago by Fernando Tusell

Analysis of categorical-variable datasets with missing values

2 years ago by Mario Santoro

Spatial and Spatio-Temporal Bayesian Model for Circular Data

4 years ago by Melanie Prague

Doubly Robust Inverse Probability Weighted Augmented GEE Estimator

5 years ago by Etienne A.D. Pienaar

Inference and Analysis for Diffusion Processes via Data Imputation and Method of Lines

8 years ago by Stephen R. Haptonstahl

Data-Informed Link Strength. Combine multiple-relationship networks into a single weighted network. Impute (fill-in) missing network links.

4 years ago by Il-Youp Kwak

Imputing Dropout Events in Single-Cell RNA-Sequencing Data

3 years ago by Emilie Poisson-Caillault

Imputation of Time Series Based on Dynamic Time Warping

3 years ago by POISSON-CAILLAULT Emilie

Imputation of Multivariate Time Series Based on Dynamic Time Warping

2 years ago by Peter Hoff

Semiparametric Factor and Regression Models for Symmetric Relational Data

2 years ago by Kosuke Imai

R Package for Designing and Analyzing Randomized Experiments

7 months ago by Yun-Hee Choi

Family Age-at-Onset Data Simulation and Penetrance Estimation

7 years ago by Alessandro Barbiero

Imputation of Missing Values Through a Forward Imputation Algorithm

7 years ago by Alessandro Barbiero

The Forward Imputation: A Sequential Distance-Based Approach for Imputing Missing Data

3 years ago by Claudio Agostinelli

Robust Estimation in the Presence of Cellwise and Casewise Contamination and Missing Data

a year ago by Hakon K. Gjessing

Analyzing Case-Parent Triad and/or Case-Control Data with SNP Haplotypes

6 months ago by Jan Graffelman

Statistical Tests and Graphics for Hardy-Weinberg Equilibrium

5 years ago by Stephan Dlugosz

EM by the Method of Weights for Incomplete Categorical Data in Generlized Linear Models

a year ago by Clifford Anderson-Bergman

Regression Models for Interval Censored Data

9 months ago by Chenguang Wang

Inference in Randomized Controlled Trials with Death and Missingness

8 months ago by Daniel P. Palomar

Imputation of Financial Time Series with Missing Values and/or Outliers

5 years ago by Neeraj Bokde

Impute Missing Data in Time Series Data with PSF Based Method

2 years ago by Marcus W. Beck

Test Bench for the Comparison of Imputation Methods

a year ago by Jonathan Bartlett

Multiple Imputation for Informative Censoring

10 months ago by Genevieve Robin

Imputation of High-Dimensional Count Data using Side Information

10 days ago by Martin Elff

Management of Survey Data and Presentation of Analysis Results

9 months ago by Guido Schwarzer

Statistical Methods for Sensitivity Analysis in Meta-Analysis

9 months ago by Alexander Robitzsch

Some Additional Multiple Imputation Functions, Especially for 'mice'

3 days ago by Vincent Audigier

Multiple Imputation by Chained Equations with Multilevel Data

3 years ago by Jacques-Emmanuel Galimard

Missing not at Random Imputation Models for Multiple Imputation by Chained Equation

a month ago by Sam Wilson

Multiple Imputation by Chained Equations with Random Forests

3 years ago by Genevieve Robin

Main Effects and Interactions in Mixed and Incomplete Data

6 months ago by Julie Josse

Linear Regression and Logistic Regression with Missing Covariates

8 years ago by Daniel J. Stekhoven

Nonparametric Missing Value Imputation using Random Forest

10 months ago by Francois Husson

Handling Missing Values with Multivariate Data Analysis

7 months ago by Paul M. Hargarten

Multiple Imputation Using Weighted Quantile Sum Regression

4 years ago by Brian Ripley

Estimation/Multiple Imputation for Mixed Categorical and Continuous Data

2 years ago by Michal Majka

High Performance Implementation of the Naive Bayes Algorithm

5 months ago by Nicholas Tierney

Data Structures, Summaries, and Visualisations for Missing Data

a month ago by Kevin Wright

Principal Components Analysis using NIPALS or Weighted EMPCA, with Gram-Schmidt Orthogonalization

8 months ago by Joseph L. Schafer

Analysis of Incomplete Multivariate Data under a Normal Model

3 months ago by Jingchen Hu

Non-Parametric Bayesian Multiple Imputation for Categorical Data

7 months ago by Frederic Bertrand

Partial Least Squares Regression for Beta Regression Models

7 months ago by Frederic Bertrand

Partial Least Squares Regression for Generalized Linear Models

4 years ago by Marco Johannes Maier

Utilities to Fit Paired Comparison Models for Preferences

3 years ago by Michael C Sachs

Methods for Evaluating Principal Surrogates of Treatment Response

25 days ago by Martijn Heymans

Prediction Model Pooling, Selection and Performance Evaluation Across Multiply Imputed Datasets

5 years ago by Alexis Gabadinho

Probabilistic Suffix Trees and Variable Length Markov Chains

2 years ago by Riyan Cheng

Tools for Mapping of Quantitative Traits of Genetically Related Individuals and Calculating Identity Coefficients from Pedigrees

4 years ago by Andy Liaw

Breiman and Cutler's Random Forests for Classification and Regression

2 years ago by Serguei Rouzinov

Regression-Based Approach for Testing the Type of Missing Data

4 years ago by Roberto Serrano-Notivoli

Reconstruction of Daily Data - Precipitation

7 months ago by Julien Vandaele

Mixture Models with Heterogeneous and (Partially) Missing Data

a year ago by Nathalie Vialaneix

Log-Linear Poisson Graphical Model with Hot-Deck Multiple Imputation

2 years ago by Maria del Carmen Calatrava Moreno

An Extended Rao-Stirling Diversity Index to Handle Missing Data

2 years ago by Valentin Todorov

Scalable Robust Estimators with High Breakdown Point for Incomplete Data

a year ago by Zhiyong Zhang

Robust Structural Equation Modeling with Missing Data and Auxiliary Variables

3 years ago by Peter Hoff

Semiparametric Bayesian Gaussian Copula Estimation and Imputation

3 months ago by Terrence D. Jorgensen

Useful Tools for Structural Equation Modeling

2 years ago by Michal Juraska

Sieve Analysis Methods for Proportional Hazards Models

4 months ago by Jonathan Bartlett

Multiple Imputation of Covariates by Substantive Model Compatible Fully Conditional Specification

5 months ago by Trevor Hastie

Matrix Completion via Iterative Soft-Thresholded SVD

a year ago by Larissa A. Matos

Spatio-Temporal Estimation and Prediction for Censored/Missing Responses

3 years ago by Juan Xiong

Simulation Extrapolation Inverse Probability Weighted Generalized Estimating Equations

5 years ago by Hanwen Zhang

Bayesian Modeling of Autoregressive Threshold Time Series Models

2 months ago by Shenghai Dai

Missing Item Responses Imputation for Test and Assessment Data

2 years ago by Minna Genbaeck

Uncertainty Intervals and Sensitivity Analysis for Missing Data

a year ago by Mohammed Sedki

Variable Selection for Model-Based Clustering of Mixed-Type Data Set with Missing Values

6 years ago by Olivia Cheronet

Data Estimation using Weighted Averages of Multiple Regressions

4 years ago by Shahla Faisal

Weighted Nearest Neighbor Imputation of Missing Values using Selected Variables

2 years ago by Nicholas L. Crookston

Nearest Neighbor Observation Imputation and Evaluation Tools

2 years ago by Javier Palarea-Albaladejo

Treatment of Zeros, Left-Censored and Missing Values in Compositional Data Sets

7 months ago by Achim Zeileis

S3 Infrastructure for Regular and Irregular Time Series (Z's Ordered Observations)