yeo.johnson {DAMisc}R Documentation

Yeo-Johnson Transformation

Description

Computes the normalizing Yeo-Johnson transformation. #' This code and the details of the help file were taken from the VGAM package.

Usage

yeo.johnson(
  y,
  lambda,
  derivative = 0,
  epsilon = sqrt(.Machine$double.eps),
  inverse = FALSE
)

Arguments

y

Numeric, a vector or matrix.

lambda

Numeric. It is recycled to the same length as y if necessary.

derivative

Non-negative integer. The default is the ordinary function evaluation, otherwise the derivative with respect to lambda.

epsilon

Numeric and positive value. The tolerance given to values of lambda when comparing it to 0 or 2.

inverse

Logical. Return the inverse transformation?

Details

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.

Value

A vector of transformed values.

Author(s)

Thomas Yee


[Package DAMisc version 1.7.2 Index]