mbqnSimuDistortion: Perturbation of sample mean and scale

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/mbqnSimuDistortion.R

Description

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

Usage

1
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

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

MBQN documentation built on Nov. 8, 2020, 8:13 p.m.