View source: R/batch_correction.R
perform_repeatability | R Documentation |
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.
perform_repeatability(object, group)
object |
a MetaboSet object |
group |
column name of pData givinh the group labels |
data frame with one row per feature with the repeatability measure
# Batch correction
## Not run:
batch_corrected <- normalize_batches(merged_sample, batch = "Batch", group = "QC", ref_label = "QC")
# Evaluate batch correction
rep_orig <- perform_repeatability(merged_sample, group = "Group")
mean(rep_orig$Repeatability)
rep_corr <- perform_repeatability(batch_corrected, group = "Group")
mean(rep_corr$Repeatability)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.