log_CT_plus {COINr} | R Documentation |
Performs a log transform on a numeric vector, but with consideration for the direction of the skew. The aim here is to reduce the absolute value of skew, regardless of its direction.
log_CT_plus(x, na.rm = FALSE)
x |
A numeric vector |
na.rm |
Set |
Specifically:
If the skew of x
is positive, this performs a modified "COIN Tool log" transform: log(x-min(x) + a)
, where
a <- 0.01*(max(x)-min(x))
.
If the skew of x
is negative, it performs an equivalent transformation -log(xmax + a - x)
.
A log-transformed vector of data, and treatment details wrapped in a list.
x <- runif(20)
log_CT(x)