Learn R Programming

RNOmni (version 0.5.0)

rankNorm: Rank-Normalize

Description

Applies the rank based inverse normal transform (INT) to a numeric vector. The INT can be conceived of as a two-step procedure. In the first, the observations are transformed onto the probability scale using the empirical cumulative distribution function (ECDF). In the second, the observations are transformed onto the real line, as Z-scores, using the probit function.

Usage

rankNorm(u, k = 3/8)

Arguments

u

Numeric vector.

k

Offset. Defaults to (3/8), correspond to the Blom transform.

Value

Numeric vector of rank normalized measurements.

Examples

Run this code
# NOT RUN {
# Draw from chi-1 distribution
y = rchisq(n=1e3,df=1);
# Rank normalize
z = rankNorm(y);
# Plot density of transformed measurement
plot(density(z));
# }

Run the code above in your browser using DataLab