Learn R Programming

tensr (version 1.0.1)

zscores: Normal scores.

Description

This function applies a quantile-quantile transformation to the data, resulting in a distribution that is approximately normal but has the same ranks as the original data.

Usage

zscores(y, ties.method = "average")

Arguments

y

A vector.

ties.method

The option ties.method in the rank function.

Value

A vector of the same length as y.

Examples

Run this code
# NOT RUN {
y <- rexp(100)
z <- tensr:::zscores(y)
par(mfrow = c(1, 3))
hist(y)
hist(z)
plot(y,z)
# }

Run the code above in your browser using DataLab