Computes the normalizing Yeo-Johnson transformation. #' This code and the details of the help file were taken from the VGAM package.
yeo.johnson(
y,
lambda,
derivative = 0,
epsilon = sqrt(.Machine$double.eps),
inverse = FALSE
)Numeric, a vector or matrix.
Numeric. It is recycled to the same length as y
if necessary.
Non-negative integer. The default is the ordinary function
evaluation, otherwise the derivative with respect to lambda.
Numeric and positive value. The tolerance given to values of
lambda when comparing it to 0 or 2.
Logical. Return the inverse transformation?
A vector of transformed values.
The Yeo-Johnson transformation can be thought of as an extension of the Box-Cox transformation. It handles both positive and negative values, whereas the Box-Cox transformation only handles positive values. Both can be used to transform the data so as to improve normality. They can be used to perform LMS quantile regression.