Skip to contents

eda_re re-expresses a vector following the Tukey or box-cox transformation.

Usage

eda_re(x, p = 0, tukey = TRUE)

Arguments

x

Vector

p

Power transformation

tukey

If set to TRUE, then adopt Tukey's power transformation, if FALSE, adopt Box-Cox transformation

Value

Returns a vector of same length as input x

Details

The function is used to re-express data using one of two transformation techniques: Box-Cox transformation (tukey = FALSE)or Tukey's power transformation (tukey = TRUE).

Examples

x <- c(15, 28, 17, 73,  8, 83,  2)
eda_re(x, p=-1/3)
#> [1] 0.4054801 0.3293169 0.3889111 0.2392723 0.5000000 0.2292489 0.7937005