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.3066195
#> Imputing along margin 1 (features/rows).
#> Warning: 36 rows with more than 50 % entries missing;
#>  mean imputation used for these rows
#> Cluster size 5574 broken into 3662 1912 
#> Cluster size 3662 broken into 1462 2200 
#> Done cluster 1462 
#> Cluster size 2200 broken into 1110 1090 
#> Done cluster 1110 
#> Done cluster 1090 
#> Done cluster 2200 
#> Done cluster 3662 
#> Cluster size 1912 broken into 1379 533 
#> Done cluster 1379 
#> Done cluster 533 
#> Done cluster 1912