mbqnSimuDistortion: Perturbation of sample mean and scale

View source: R/mbqnSimuDistortion.R

mbqnSimuDistortionR Documentation

Perturbation of sample mean and scale

Description

mbqnSimuDistortion adds a random perturbation of mean and scale to each column of a matrix.

Usage

mbqnSimuDistortion(x, s.mean = 0.05, s.scale = 0.01)

Arguments

x

a matrix or data frame.

s.mean

scatter of relative change of mean.

s.scale

scatter of realtive change in scale, i.e. 0.01 corresponds to 1 percent.

Details

Shift and scale the sample mean and standard deviation of a matrix. The perturbation of center and scale relative to mean and standard deviation of each sample are drawn from a Gaussian distribution |N(0,σ^2)| with σ_mean=s.mean and σ_scale=s.scale, respectively.

Value

List with:

x.mod

perturbed matrix

mx.offset

numeric array of shifts of the sample means

mx.scale

numeric array of relative scales of the sample standard deviations.

Author(s)

Ariane Schad

References

Brombacher, E., Schad, A., Kreutz, C. (2020). Tail-Robust Quantile Normalization. BioRxiv.

See Also

mbqnSimuData() for data generation.

Examples

set.seed(1234)
x <- mbqnSimuData("omics.dep")
df <- mbqnSimuDistortion(x)

arianeschad/mbqn documentation built on March 29, 2022, 6:56 p.m.