- data
a data frame with incomplete data, where
missing values are coded as NA.
- ...
an expression indicating the variable names in
data e.g., na.pattern(dat, x1, x2, x3).
Note that the operators +, -,
~, :, ::, and ! can also
be used to select variables, see 'Details' in the
df.subset function.
- order
logical: if TRUE, variables are ordered from left to
right in increasing order of missing values.
- n.pattern
an integer value indicating the minimum number of cases sharing
a missing data pattern to be included in the result table and the plot, e.g., specifying
n.pattern = 5 excludes missing data patters with less than 5 cases.
- digits
an integer value indicating the number of decimal places to
be used for displaying percentages.
- as.na
a numeric vector indicating user-defined missing values,
i.e. these values are converted to NA before conducting the
analysis.
- plot
logical: if TRUE, missing data pattern is plotted.
- square
logical: if TRUE (default), the plot tiles are squares
to mimic the md.pattern function in the package mice.
- rotate
logical: if TRUE, the variable name labels are rotated 90 degrees.
- color
a character string indicating the color for the "fill" argument.
Note that the first color represents missing values and the second color
represent observed values.
- tile.alpha
a numeric value between 0 and 1 for the alpha argument (default is 0.1).
- plot.margin
a numeric vector indicating the plot.margin argument for the theme function.
- legend.box.margin
a numeric vector indicating the legend.box.margin
argument for the theme function.
- legend.key.size
a numeric value indicating the legend.key
argument (default is unit(12, "pt")) for the theme function.
- legend.text.size
a numeric value indicating the legend.text
argument (default is element_text(size = 10)) for the theme function.
- filename
a character string indicating the filename argument (default is "NA_Pattern.pdf") including
the file extension for the ggsave function. Note that one of ".eps", ".ps",
".tex", ".pdf" (default), ".jpeg", ".tiff", ".png", ".bmp",
".svg" or ".wmf" needs to be specified as file extension in the file argument.
- width
a numeric value indicating the width argument (default is the
size of the current graphics device) for the ggsave function.
- height
a numeric value indicating the height argument
(default is the size of the current graphics device) for the ggsave function.
- units
a character string indicating the units argument
(default is in) for the ggsave function.
- dpi
a numeric value indicating the dpi argument
(default is 600) for the ggsave function.
- write
a character string naming a file for writing the output into
either a text file with file extension ".txt" (e.g.,
"Output.txt") or Excel file with file extension
".xlsx" (e.g., "Output.xlsx"). If the file
name does not contain any file extension, an Excel file will
be written.
- append
logical: if TRUE (default), output will be appended
to an existing text file with extension .txt specified
in write, if FALSE existing text file will be
overwritten.
- check
logical: if TRUE (default), argument specification is checked.
- output
logical: if TRUE (default), output is shown.