Learn R Programming

JointAI (version 0.1.0)

md_pattern: Missing data pattern

Description

Plot the pattern of missing data. The missing data pattern is determined using the function md.pattern from the mice package.

Usage

md_pattern(data, plot = TRUE, xlab = "", ylab = "", xaxis_pars = list(),
  yaxis_pars = list(), printN = TRUE, print = TRUE, ...)

Arguments

data

data frame

plot

logical; should the missing data pattern be plotted?

xlab

label for the x-axis

ylab

label for the y-axis

xaxis_pars

list of optional parameters for the x-axis

yaxis_pars

list of optional parameters for the y-axis

printN

logical; should the title "N" of the y-axis be printed?

print

should the missing data pattern be returned as a matrix?

...

optional additional parameters passed to image()

Examples

Run this code
# NOT RUN {
md_pattern(wideDF)

par(mar = c(3, 1, 1.5, 1.5), mgp = c(2, 0.6, 0))
md_pattern(longDF, yaxis_pars = list(cex.axis = 0.8))

# }

Run the code above in your browser using DataLab