This function computes a summary of missing data patterns, i.e., number ( cases with a specific missing data pattern.
na.pattern(..., data = NULL, order = FALSE, digits = 2, as.na = NULL, write = NULL,
append = TRUE, check = TRUE, output = TRUE)Returns an object of class misty.object, which is a list with following
entries:
callfunction call
typetype of analysis
datadata frame used for the current analysis
argsspecification of function arguments
resultresult tables
patterngroup variable of missing data pattern
a matrix or data frame with incomplete data, where missing
values are coded as NA. a matrix or data frame with incomplete data, where missing
values are coded as NA. Alternatively, an expression
indicating the variable names in data e.g.,
na.pattern(x1, x2, x3, data = dat).Note that the operators
., +, -, ~, :, ::,
and ! can also be used to select variables, see 'Details'
in the df.subset function.
a data frame when specifying one or more variables in the
argument .... Note that the argument is NULL
when specifying a matrix or data frame for the argument ....
logical: if TRUE, variables are ordered from left to
right in increasing order of missing values.
an integer value indicating the number of decimal places to be used for displaying percentages.
a numeric vector indicating user-defined missing values, i.e. these values are converted to NA before conducting the analysis.
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 extention
".xlsx" (e.g., "Output.xlsx"). If the file
name does not contain any file extension, an Excel file will
be written.
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.
logical: if TRUE (default), argument specification is checked.
logical: if TRUE (default), output is shown.
Takuya Yanagida takuya.yanagida@univie.ac.at
Enders, C. K. (2010). Applied missing data analysis. Guilford Press.
Graham, J. W. (2009). Missing data analysis: Making it work in the real world. Annual Review of Psychology, 60, 549-576. https://doi.org/10.1146/annurev.psych.58.110405.085530
van Buuren, S. (2018). Flexible imputation of missing data (2nd ed.). Chapman & Hall.
write.result, as.na, na.as,
na.auxiliary, na.coverage, na.descript,
na.indicator, na.prop, na.test