RankNorm: Rank-Normalize

View source: R/RN.R

RankNormR Documentation

Rank-Normalize

Description

Applies the rank-based inverse normal transform (INT) to a numeric vector. The INT can be broken down into 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 = 0.375, ties.method = "average")

Arguments

u

Numeric vector.

k

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

ties.method

Method of breaking ties, passed to base::rank.

Value

Numeric vector of rank normalized values.

See Also

  • Direct INT test DINT.

  • Indirect INT test IINT.

  • Omnibus INT test OINT.

Examples

# Draw from chi-1 distribution
y <- stats::rchisq(n = 1e3, df = 1)
# Rank normalize
z <- RankNorm(y)
# Plot density of transformed measurement
plot(stats::density(z))

RNOmni documentation built on Sept. 11, 2023, 9:07 a.m.