Compute $$f(x) = m \log(m(x - b))$$
Usage
scaled_shifted_log(x, m, b)
Arguments
- x
Value to transform
- m
Scale parameter. Most relevant for its
sign. Typical choices are -1 or 1.
- b
finite endpoint of the domain (whether
it is the left or right endpoint is determined
by the sign of m).
Details
This is an increasing function.
When \(m > 0\), it maps \((b, \infty)\) to
\((-\infty, \infty)\). When \(m < 0\), it maps
\((-\infty, b)\) to \(-\infty, \infty)\).
Examples
# with m = 1, b = 0, equivalent to `log`
scaled_shifted_log(5, 1, 0)
#> [1] 1.609438
log(5)
#> [1] 1.609438
# but can handle other domains
scaled_shifted_log(-exp(3), -1, 5)
#> [1] -3.222291