Maturing lifecycle

pow_boxcox(x, lambda = NULL, lambda2 = NULL, ...)

Arguments

x

[univariate vector]

Univariate vector, numeric or ts object with only one dimension.

lambda

[numeric(1): NULL]

Transformation exponent, \(\lambda\).

lambda2

[numeric(1): NULL]

Transformation exponent, \(\lambda_2\).

...

Further arguments passed to pow.

Value

Returns a vector with the same class and attributes as the input vector.

References

Box, G. E., & Cox, D. R. (1964). An analysis of transformations. Journal of the Royal Statistical Society. Series B (Methodological), 211-252. https://www.jstor.org/stable/2984418

Examples

set.seed(123) x <- runif(10) pow_boxcox(x, 3)
#> [1] -0.32540570 -0.17004250 -0.31053122 -0.10383130 -0.05605890 -0.33330182 #> [7] -0.28423794 -0.09642233 -0.27743977 -0.30159906