Skip to contents

Compute $$f(x) = \log(x - a) - \log(b - x)$$ for \(b > a\). This is an increasing function that maps the interval \((a, b)\) to \((-\infty, \infty)\).

Usage

scaled_logit(x, a, b)

Arguments

x

Value to transform

a

Left endpoint of the domain

b

Right endpoint of the domain

Value

Transformed value

Examples


# with a = 0, b = 1, equivalent to `qlogis`
scaled_logit(0.7, 0, 1)
#> [1] 0.8472979
qlogis(0.7)
#> [1] 0.8472979

# but can work with other domains
scaled_logit(3, 1, 7)
#> [1] -0.6931472