Skip to contents

Perform mixed imputation on a data matrix

Usage

mixed_imputation_matrix(data, ed, cutoff = "empirically")

Arguments

data

A matrix with intensity values

ed

The experimental design data frame.

cutoff

The cutoff used for MAR/MNAR classification. See create_imputation_mask

Value

A matrix without missing values

Examples

se <- prepare_se(report.pg_matrix, expDesign, report.pr_matrix, impute = 'none')

data_missing <- as.matrix(SummarizedExperiment::assay(se)) # Intensity matrix with missing values
ed <- as.data.frame(SummarizedExperiment::colData(se)) # The experimental conditions
data_full <- mixed_imputation_matrix(data_missing, ed, cutoff = 'empirically')
#> Imputing along margin 2 (samples/columns).
#> [1] 0.3061269
#> Imputing along margin 1 (features/rows).
#> Warning: 36 rows with more than 50 % entries missing;
#>  mean imputation used for these rows
#> Cluster size 5548 broken into 2203 3345 
#> Cluster size 2203 broken into 1569 634 
#> Cluster size 1569 broken into 1504 65 
#> Cluster size 1504 broken into 645 859 
#> Done cluster 645 
#> Done cluster 859 
#> Done cluster 1504 
#> Done cluster 65 
#> Done cluster 1569 
#> Done cluster 634 
#> Done cluster 2203 
#> Cluster size 3345 broken into 2136 1209 
#> Cluster size 2136 broken into 1087 1049 
#> Done cluster 1087 
#> Done cluster 1049 
#> Done cluster 2136 
#> Done cluster 1209 
#> Done cluster 3345