
Last chance! 50% off unlimited learning
Sale ends in
This function computes the proportion of cases that contributes for the calculation of each variance and covariance.
na.coverage(x, tri = c("both", "lower", "upper"), digits = 2, as.na = NULL,
write = NULL, check = TRUE, output = TRUE)
Returns an object of class misty.object
, which is a list with following entries:
function call (call
), type of analysis type
, matrix or data frame specified in
x
(data
), specification of function arguments (args
), and
list with results (result
).
a matrix or data frame.
a character string or character vector indicating which triangular of the matrix to show on the console,
i.e., both
for upper and lower triangular, lower
(default) for the lower triangular,
and upper
for the upper triangular.
an integer value indicating the number of decimal places to be used for displaying proportions.
a numeric vector indicating user-defined missing values,
i.e. these values are converted to NA
before conducting the analysis.
a character string for writing the results into a Excel file naming a file with or without file extension '.xlsx', e.g., "Results.xlsx"
or "Results"
.
logical: if TRUE
, argument specification is checked.
logical: if TRUE
, output is shown on the console.
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.descript
, na.indicator
, na.pattern
,
na.prop
, na.test
dat <- data.frame(x = c(1, NA, NA, 6, 3),
y = c(7, NA, 8, 9, NA),
z = c(2, NA, 3, NA, 5))
# Compute variance-covariance coverage
na.coverage(dat)
if (FALSE) {
# Write Results into a Excel file
na.coverage(dat, write = "Coverage.xlsx")
result <- na.coverage(dat, output = FALSE)
write.result(result, "Coverage.xlsx") }
Run the code above in your browser using DataLab