BoxCoxTrans.default

0th

Percentile

Box-Cox Transformations

This class can be used to estimate a Box-Cox transformation and apply it to existing and future data

Keywords
utilities
Usage
BoxCoxTrans(y, ...)

## S3 method for class 'default': BoxCoxTrans(y, x = rep(1, length(y)), fudge = 0.2, numUnique = 3, na.rm = FALSE, ...)

## S3 method for class 'BoxCoxTrans': predict(object, newdata, ...)

Details

This function is basically a wrapper for the boxcox function in the MASS library. It can be used to estimate the transformation and apply it to new data.

If any(y <= 0)<="" code=""> or if length(unique(y)) < numUnique, lambda is not estimated and no transformation is applied.

Value

  • BoxCoxTrans returns a list of class BoxCoxTrans with elements
  • lambdaestimated transformation value
  • fudgevalue of fudge
  • nnumber of data points used to estimate lambda
  • summarythe results of summary(y)
  • ratiomax(y)/min(y)
  • skewnesssample skewness statistic
  • predict.BoxCoxTrans returns a numeric vector of transformed values

References

Box, G. E. P. and Cox, D. R. (1964) An analysis of transformations (with discussion). Journal of the Royal Statistical Society B, 26, 211-252.

See Also

boxcox, preProcess

Aliases
Examples
data(BloodBrain)

ratio <- exp(logBBB)
bc <- BoxCoxTrans(ratio)

bc

predict(bc, ratio[1:5])


ratio[5] <- NA
bc2 <- BoxCoxTrans(ratio, bbbDescr$tpsa, na.rm = TRUE)
bc2
Documentation reproduced from package caret, version 5.07-001, License: GPL-2

Community examples

Looks like there are no examples yet.