bct | R Documentation |
bct
returns the Box-Cox transformed numeric vector (Box and Cox,
1964).
bct(y, lambda)
y |
a positive real number vector. |
lambda |
a scalar transformation parameter. |
bct returns the Box-Cox transformed numeric vector,
z = log(y)
for lambda = 0
,
z = (y ^ lambda - 1) / lambda
for lambda ne 1
.
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")}.
y <- exp(rnorm(10))
z <- bct(y, 0) #log transformation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.