box | R Documentation |
This function performs Box-Cox transformation on the inputted data matrix.
box(data, lambda)
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, |
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, \lambda
, has to be positive
in order to avoid discontinuity across zero.
A numeric vector, matrix or data frame of the same dimension as
data
is returned.
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.
rbox
data(rituximab)
library(flowCore)
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.