Description Usage Arguments Value
View source: R/ComparingImpMethods.R
From CreateCorrelation() correlation matrices are in 3d arrays with dimensions num_of_metabo x num_of_metabo x total number of studies First we change the 3d array into a 2d matrix with dimensions (num_of_metabos x (num_of_metabos-1)/2 by total number of studies Each column corresponds to an individual study and each row to a pairwise correlation of metabolites. Then we use the fischer transform and run MICE on the transpose of the prepped 2d matrix. 5 MICE iputations are done and then the median is taken for each pairwise value corr_array_mice is a 3d array with dimensions num_of_metabo x num_of_metabo x total number of studies that has been un-fischer transformed. reorganized_corr_imp_med is a 2d matrix with dimensions (num_of_metabos x (num_of_metabos-1)/2 by total number of studies that is still fischer transformed. reorganized_corr_imp_med will be the input for the next step of the imputation pipeline.
1 2 3 4 5 6 | ReorganizeAndMICE(
corr_array_obs,
factor_mat,
num_of_metabos = 20,
num_of_predictors = 0
)
|
corr_array_obs |
Observed correlation array. Output from CreateCorrelation() |
factor_mat |
Matrix where 3 columns are three factors and rows are values of each factor |
num_of_metabos |
Number of metabolites |
num_of_predictors |
Number of other metabolites for MICE to use, set to 0 to use quickpred() |
un-fischer transformed 3d array corr_array_mice and fischer transformed 2d matrix reorganized_corr_imp_med
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.