ap_mads: MAD normalization

View source: R/data_transformation.R

ap_madsR Documentation

MAD normalization

Description

Sample based normalization to number of Median Absolute Deviations (MADs) from the median for Autoimmunity profiling data.

Usage

ap_mads(x, constant = 1, ...)

Arguments

x

List of MFI values with two levels per element: level one = assay data sets ; level two = bead subsets (e.g. wih and w/o controls)

constant

Constant for mad() function, default is 1 (compared to 1.4826 in base function).

...

Further arguments passed do median and mad

Details

The input values will be normalized per sample to the number of MADs from the median using the algorithm MADs = (MFI - median )/MAD, where MAD is calculated using mad(constant=1)

The input values should be MFI values, and structured as a list, even if only one data set is used (see examples).

Value

List of MADs, with same structure as input list.

Examples

Input structure examples:
# One assay data set with one subset
list(Assay=list(All=SBA@X))
# One assay data set but with two different subsets
list(Assay=list(All=SBA@X,
WithoutControls=SBA@X[,SBA@Beads$Type != "Control"]))
# Two assay data sets with two different subsets
list(CSF=list(All=SBA_csf@X,
WithoutControls=SBA_csf@X[,SBA_csf@Beads$Type != "Control"]),
Plasma=list(All=SBA_plasma@X,
WithoutControls=SBA_plasma@X[,SBA_plasma@Beads$Type != "Control"]))

cekehe/rappp documentation built on May 17, 2022, 8:54 a.m.