perform_repeatability: Compute repeatability measures

View source: R/batch_correction.R

perform_repeatabilityR Documentation

Compute repeatability measures

Description

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.

Usage

perform_repeatability(object, group)

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

# 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)

antonvsdata/notame documentation built on Sept. 14, 2024, 11:09 p.m.