R/cor_tables.R
package-deprecated.Rd
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)
Takes some code from the miceadds::micombine.cor
function,
but adapted to use weights and return in the format accepted by
report_cor_table
A list of dataframes of multiple imputation results
A variable within mi_list that gives the survey weights
A named character vector with new variable names or a tibble as provided by get_rename_tribbles()
for variables. If NULL, then the variables are not renamed. If names are provided, only the variables included here are retained.
This is most helpful when the results are passed to some print function, such as report_cor_table()
To facilitate post-processing, correlations with original variable
names are returned in the tests
element.
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.
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.
cor_matrix_mi