View source: R/helper_functions.R
g_bc | R Documentation |
Evaluate the Box-Cox transformation, which is a scaled power transformation
to preserve continuity in the index lambda
at zero. Negative values are
permitted.
g_bc(t, lambda)
t |
argument(s) at which to evaluate the function |
lambda |
Box-Cox parameter |
The evaluation(s) of the Box-Cox function at the given input(s) t
.
Special cases include
the identity transformation (lambda = 1
),
the square-root transformation (lambda = 1/2
),
and the log transformation (lambda = 0
).
# Log-transformation:
g_bc(1:5, lambda = 0); log(1:5)
# Square-root transformation: note the shift and scaling
g_bc(1:5, lambda = 1/2); sqrt(1:5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.