rntransform: Rank-based inverse normal tranformation

View source: R/melonnpan_utilities.R

rntransformR Documentation

Rank-based inverse normal tranformation

Description

This function rank normal transforms a vector of data. The procedure is built off of that provided in the GenABEL pacakge.

Usage

rntransform(y, split_ties = FALSE)

Arguments

y

a numeric vector which will be rank normal transformed

split_ties

a binary string of FALSE (default) or TRUE indicating if tied values, of the same rank, should be randomly split giving them unique ranks.

Value

returns a numeric vector, with the same length as y, of rank normal transformed values

Examples

## simulate a negative binomial distribution of values
nb_data = rnbinom(500, mu = 40, size = 100)
## rank normal transform those values
rnt_data = rntransform( nb_data , split_ties = TRUE )


biobakery/melonnpan documentation built on March 26, 2024, 11:42 p.m.