bct: Applying the Box-Cox Transformation.

View source: R/bct.R

bctR 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, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/j.2517-6161.1964.tb00553.x")}.

Examples

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


kzkzmr/bcmixed documentation built on Oct. 18, 2023, 10:32 p.m.