tablemissing: Tabulate and visualize missing values

Description Usage Arguments Details Value Author(s) Examples

Description

Tabulates missing values in variables and patterns of missing values among variables. It produces a missing value plot displaying different patterns of missing values among variables and missing value counts.

Usage

1
tablemissing(x, sortby = "variable")

Arguments

x

the dataset to be examined. It should be of class matrix or dataframe.

sortby

a logical value indicating whether the variables, patterns or both are sorted by the numbers of missing values. Possible values are "variable" (sort by variable name), "row" (sort by pattern counts), "column" (sort by variable counts) and "both" (sort by variable and pattern counts).

Details

This function tabulates the missing values in variables and the patterns of missings. The input data should be of class matrix or dataframe. The function also displays a missing value plot. Each row represents a pattern of missings, where the variables with missing values are shown in yellow. The barchart below shows the proportions of missing values by variable. The barchart on the right displays the pattern frequencies. This barchart uses the concept of censored zooming. The topmost bar, representing no missing values in any variable, is likely to be much larger than the others and will then not be drawn to scale, but bordered in red to show this. Ordering of variables and patterns of missings based on counts can be very useful for exploring the structure of missings in a dataset.

Value

finaltable

A table of class dataframe containing number of missing values in variable and missing pattern

Author(s)

Waqas Ahmed Malik

Examples

1
2
data(adult, package="vmv")
tablemissing(adult, sortby="variable")

gmonette/spida15 documentation built on May 17, 2019, 7:26 a.m.