wtd_cor_matrix_mi | R Documentation |
This function takes an imputationList with a vector of weights and returns a correlation matrix for all numeric variables as well as a list of descriptives that pools the results across all imputations.
wtd_cor_matrix_mi(mi_list, weights, var_names = NULL)
mi_list |
A list of dataframes of multiple imputation results |
weights |
A variable within mi_list that gives the survey weights |
var_names |
A named character vector with new variable names or a tibble as provided by |
Variables starting with . are dropped, as these are likely to be .imp and .id from mice. If you want correlations for such variables, rename them.
A correlation matrix list similar to the format provided by
jtools::svycor()
with the addition of a desc
-element with means
and standard deviations of the variables.
Takes some code from the miceadds::micombine.cor
function,
but adapted to use weights and return in the format accepted by
report_cor_table
cor_matrix_mi
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.