Dealing With Missing Data in R
Learn to find, visualize, tidy and impute missing values in R with naniar and tidyverse tools, and check whether gaps bias your analysis.
You learn to find, understand and fill missing values in R, using the naniar package with tidyverse tools so that gaps turning up in unexpected places stop making results hard to read. Along the way you recode hidden markers such as N/A as NA, check whether missingness depends on other variables and points to bias, and replace the blanks with imputation models whose output you test against the original data.
What You Will Achieve
- Spot gaps in an R dataset and produce overview plots showing where values are absent
- Turn placeholder entries such as N/A into NA and restore rows that are implied but never listed
- Check whether values go missing at random or depend on other variables, and spot the bias that follows
- Fill gaps with a model and decide which imputed dataset gives results you can rely on
Program Overview
Finding and Summarizing Missing Values
Starts with how R treats missing values, then counts and tabulates them across cases, variables and groups before plotting them.
- Missing values and their behavior in R
- Missingness summaries by case, variable and group
- Overview and pattern visualizations
Tidying Missing Values and Testing Dependence
Uncovers hidden and implicit missings, sets out the MCAR, MAR and MNAR types, and links missingness back to values with shadow matrices and nabular data.
- replace_with_na and miss_scan_count for hidden missings
- complete() and fill() for implicit missings
- Shadow matrix and nabular data workflows
- Box plots, scatter plots and facets by missingness
Imputation Models and Their Evaluation
Fills in missing values, tracks the imputed ones, and weighs good and bad imputations against the original data and across models.
- Imputing below range with nabular data
- Histograms and scatter plots of imputed values
- Imputation with simputation
- Comparing models, parameters and inferences
Certificate Awarded (Paid)
Job Outlook
These skills apply wherever data in R is cleaned and prepared before analysis or modeling, in research, reporting and data analysis work that depends on complete and unbiased inputs.
Good for: Analysts working in R who keep meeting gaps in their data and want a set method for finding, tracing and filling them.
Keep in mind: The lessons center on the naniar package with tidyverse tools, and imputation uses the simputation package, so the code you practice is specific to R.
Bottom line: A focused look at missing data in R that pairs plots of where values are absent with tests of why, then checks imputed values against the originals.
Frequently Asked Questions
What are shadow matrices and nabular data?
They are special data structures introduced in the third chapter. They let you link summaries of missingness back to the values in your data, so you can use ggplot to see how values change as other variables go missing.
What counts as a hidden missing value?
Entries such as missing or N/A typed into the data stand for absent values without being recorded as NA. The lessons show how to search for them and replace them with NA, and how to handle implicit missings that are implied but never listed.
Which functions and packages come up in the lessons?
naniar carries most of the work, with functions such as miss_scan_count and replace_with_na for finding and recoding missings. The lessons also use complete() and fill(), ggplot for plots, and the simputation package for building imputations.
How does the course judge whether an imputation is good?
The final chapter sets out the features of good and bad imputations, then checks imputed values against the original data in scatter plots and histograms, on their scale and across many variables, and compares several models and their parameters.
Please log in to report a problem with this page.


There are no reviews yet.