Learn R Programming

SeBR (version 1.0.0)

g_bc: Box-Cox transformation

Description

Evaluate the Box-Cox transformation, which is a scaled power transformation to preserve continuity in the index lambda at zero. Negative values are permitted.

Usage

g_bc(t, lambda)

Value

The evaluation(s) of the Box-Cox function at the given input(s) t.

Arguments

t

argument(s) at which to evaluate the function

lambda

Box-Cox parameter

Examples

Run this code
# 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)

Run the code above in your browser using DataLab