bct {bcmixed}R Documentation

Applying the Box-Cox Transformation.

Description

bct returns the Box-Cox transformed numeric vector (Box and Cox, 1964).

Usage

bct(y, lambda)

Arguments

y

a positive real number vector.

lambda

a scalar transformation parameter.

Value

bct returns the Box-Cox transformed numeric vector, z = log(y) for lambda = 0, z = (y ^ lambda - 1) / lambda for lambda ne 1.

References

Box, G.E.P. and Cox, D.R. (1964). An analysis of transformations (with discussion). Journals of the Royal Statistical Society, Series B, 26, 211-246, https://doi.org/10.1111/j.2517-6161.1964.tb00553.x.

Examples

  y <- exp(rnorm(10))
  z <- bct(y, 0) #log transformation


[Package bcmixed version 0.1.4 Index]