na.coverage | R Documentation |
This function computes the proportion of cases that contributes for the calculation of each variance and covariance.
na.coverage(..., data = NULL, tri = c("both", "lower", "upper"), digits = 2,
as.na = NULL, write = NULL, append = TRUE, check = TRUE,
output = TRUE)
... |
a matrix or data frame with incomplete data, where missing
values are coded as |
data |
a data frame when specifying one or more variables in the
argument |
tri |
a character string or character vector indicating which triangular
of the matrix to show on the console, i.e., |
digits |
an integer value indicating the number of decimal places to be used for displaying proportions. |
as.na |
a numeric vector indicating user-defined missing values,
i.e. these values are converted to |
write |
a character string naming a file for writing the output into
either a text file with file extension |
append |
logical: if |
check |
logical: if |
output |
logical: if |
Returns an object of class misty.object
, which is a list with following
entries:
call |
function call |
type |
type of analysis |
data |
data frame used for the current analysis |
args |
specification of function arguments |
result |
result table |
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
# Example 1a: Compute variance-covariance coverage
na.coverage(airquality)
# Example 1b: Alternative specification using the 'data' argument
na.coverage(., data = airquality)
## Not run:
# Example 2a: Write Results into a text file
na.coverage(airquality, write = "Coverage.txt")
# Example 2b: Write Results into an Excel file
na.coverage(airquality, write = "Coverage.xlsx")
result <- na.coverage(airquality, output = FALSE)
write.result(result, "Coverage.xlsx")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.