rntransform {GenABEL}R Documentation

Rank-transformation to normality

Description

Rank-transformation to normality.

Usage

rntransform(var)

Arguments

var Vector containing a variable to be transformed

Details

Rank-transformation to normality generates perfectly normal distribution from ANY distribution, unless many/heavy ties are present.

Value

Vector containing transformed variable

Author(s)

Yurii Aulchenko

See Also

~~objects to See Also as help, ~~~

Examples

        # uniformly distributed variable
        x <- round(runif(200)*100)
        # get 7 missing values
        x[round(runif(7,min=1,max=100))] <- NA
        # transform
        y <- rntransform(x)
        # test normality of the original and transformed var
        shapiro.test(x)
        shapiro.test(y)
        # plot histogram
        par(mfcol=c(2,1))
        hist(x)
        hist(y)

[Package GenABEL version 1.3-1 Index]