perform_repeatability: Compute repeatability measures

Description Usage Arguments Value Examples

View source: R/batch_correction.R

Description

Computes repeatability for each feature with the following formula:

\frac{σ^2_{between}}{σ^2_{between} + σ^2_{within}}

The repeatability ranges from 0 to 1. Higher repeatability depicts less variation between batches.

Usage

1

Arguments

object

a MetaboSet object

group

column name of pData givinh the group labels

Value

data frame with one row per feature with the repeatability measure

Examples

1
2
3
4
5
6
7
# Batch correction
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)

antonvsdata/amp documentation built on Jan. 8, 2020, 3:15 a.m.