svy_miss_var_summary | R Documentation |
This function creates a tibble that summarizes missing data
with survey weights for missing counts and proportions. (Apart from
that, it recreates the naniar::miss_var_summary()
output.)
svy_miss_var_summary(
svy_data,
...,
.any_missing = TRUE,
.include_complete = FALSE
)
svy_data |
A survey object created with the survey package |
... |
Variables to consider. By default this looks at the whole dataset.
Otherwise, this should be one or more unquoted expressions separated by commas, or
a tidyselect helper function (e.g., |
.any_missing |
Should a row be shown at the start of the return with the number and share of (weighted) responses that have missing data on at least one of the variables considered? Defaults to TRUE. |
.include_complete |
Should variables with no missing data be included in the returned tibble? Defaults to FALSE. |
library(survey)
data(api)
svy_df <- svydesign(id = ~1, strata = ~stype, weights = ~pw,
data = apistrat, fpc = ~fpc)
svy_miss_var_summary(svy_df, acs.core, target, name)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.