flowClust (version 3.10.1)

box: Box-Cox Transformation

Description

This function performs Box-Cox transformation on the inputted data matrix.

Usage

box(data, lambda)

Arguments

data
A numeric vector, matrix or data frame of observations. Negative data values are permitted.
lambda
The transformation to be applied to the data. If negative data values are present, lambda has to be positive.

Value

A numeric vector, matrix or data frame of the same dimension as data is returned.

Details

To allow for negative data values, a slightly modified version of the original Box-Cox (1964) is used here. This modified version originated from Bickel and Doksum (1981), taking the following form: $$f(y) = \frac{\mathrm{sgn}(y)|y|^\lambda-1}{\lambda}$$ When negative data values are involved, the transformation parameter, $\code{lambda}$, has to be positive in order to avoid discontinuity across zero.

References

Bickel, P. J. and Doksum, K. A. (1981) An Analysis of Transformations Revisited. J. Amer. Statist. Assoc. 76(374), 296-311.

Box, G. E. P. and Cox, D. R. (1964) An Analysis of Transformations. J. R. Statist. Soc. B 26, 211-252.

See Also

rbox

Examples

Run this code
data(rituximab)
data <- exprs(rituximab)
summary(data)
# Transform data using Box-Cox with lambda=0.3
dataTrans <- box(data, 0.3)
# Reverse transform data; this should return back to the original rituximab data
summary(rbox(dataTrans, 0.3))

Run the code above in your browser using DataLab