Description Usage Arguments Details Value Author(s) Examples
View source: R/aveytoolkit_INT.R
INT
INT performs an inverse normal transformation
1 2 3 4 5 6 |
x |
numeric vector to be transformed |
na.last |
How NA values should be handled. Passed to |
ties.method |
How ties should be handled. Passed to |
... |
Other arguments passed to |
Takes an input vector and performs a rank-based inverse normal transformation (making the data approximately normally distributed. Positions with missing (NA) values will be returned as NA by default (see 'na.last')
A numeric vector containing the transformed values of x.
Stefan Avey
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Normally Distributed data
x1 <- rnorm(100)
hist(INT(x1)) # still normally distributed
hist(INT(x1, mean = 10, sd = 2)) # still normally distributed
## Uniformly Distributed data
x2 <- runif(100)
hist(INT(x2)) # forced to be normally distributed by rank
## Many ties in data, different methods for handling ties
x3 <- rep(10:20, 5)
hist(INT(x3, ties.method = "average"))
hist(INT(x3, ties.method = "first"))
hist(INT(x3, ties.method = "max"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.