| ll4 | R Documentation |
Applies a log-logistic like transformation, specifically log_base(x^lambda + 1) / lambda.
This transformation is useful for compressing data that spans several orders of
magnitude while handling zero values gracefully (as x=0 yields 0).
It's a variation related to the Box-Cox transformation or a generalized logarithm.
ll4(x, lambda = 4, base = 10)
x |
A numeric vector or scalar of non-negative values to be transformed. |
lambda |
A positive numeric scalar, the lambda parameter of the transformation.
Controls the curvature. Default is |
base |
A positive numeric scalar, the base of the logarithm. Default is |
A numeric vector or scalar of the transformed values.
Returns NaN for x < 0 if lambda results in non-real numbers (e.g., even root of negative).
However, the intended domain is x >= 0.
ll4(0)
ll4(1)
ll4(10)
ll4(100)
ll4(c(0, 1, 10, 100, 1000))
# Using a different lambda or base
ll4(10, lambda = 2)
ll4(10, base = exp(1)) # Natural log base
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.