Computes repeatability for each feature with the following formula: $$\frac{\sigma^2_{between}}{\sigma^2_{between} + \sigma^2_{within}}$$ The repeatability ranges from 0 to 1. Higher repeatability depicts less variation between batches.
Arguments
- object
a
SummarizedExperiment
orMetaboSet
object- group
column name of pheno data giving the group labels
- assay.type
character, assay to be used in case of multiple assays
Examples
data(example_set)
# Batch correction
replicates <- list(which(example_set$QC == "QC"))
batch_corrected <- ruvs_qc(example_set, replicates = replicates)
# Evaluate batch correction
rep_orig <- perform_repeatability(example_set, group = "Group")
mean(rep_orig$Repeatability, na.rm = TRUE)
#> [1] 0.3658633
rep_corr <- perform_repeatability(batch_corrected, group = "Group")
mean(rep_corr$Repeatability, na.rm = TRUE)
#> [1] 0.4051463