YeoJohn: Apply optimal Yeo-Johnson transformation to a numeric vector

View source: R/YeoJohn.R

YeoJohnR Documentation

Apply optimal Yeo-Johnson transformation to a numeric vector

Description

Finds the Yeo-Johnson transformation that minimizes the skewness of the vector. Returns the transformed vector with an attribute "lambda" (transformation parameter). Uses yeo.johnson.

Usage

YeoJohn(x, keepMedian = T, keepMAD = T, trim = 0)

Arguments

x

numeric vector to transform

keepMedian

Should the result be shifted so that it has the same median as the input vector?

keepMAD

Should the result be scaled so that it has the same dispersion (median absolute deviation) as the input vector?

trim

Numeric value between 0 and .5 . For robustness against outliers, this amount of each of the distribution's tails is excluded when estimating the optimal lambda.


akcochrane/ACmisc documentation built on Nov. 24, 2024, 11:22 a.m.