boxCoxTransform {ldt}R Documentation

Box-Cox Transformation of Numeric Matrix

Description

This function applies the Box-Cox transformation to the columns of a numeric matrix.

Usage

boxCoxTransform(data, lambdas, ...)

Arguments

data

A numeric matrix to be transformed.

lambdas

A numeric vector, a single number, NA, or NULL indicating the lambda parameter(s) for the Box-Cox transformation. Use NULL for no transformation, NA for estimating the lambda parameter for each variable, a single number for equal lambda parameter for all variables, and a numeric vector for distinct lambda parameters for the corresponding variables.

...

additional parameters for MASS::boxcox function.

Value

data

transformed data

lambdas

final lambda vector used in the calculations.

Examples

data <- matrix(rnorm(40), ncol = 2)
result <- ldt:::boxCoxTransform(data, c(0.5, 0.5))


[Package ldt version 0.5.3 Index]