logit_transform: Transform a vector of proportions using the logit...

View source: R/logit_transform.R

logit_transformR Documentation

Transform a vector of proportions using the logit transformation

Description

Transform a vector of values between 0 and 1 using the logit transformation. Includes a buffer, which by default nudges 0s and 1s inward to avoid infinite values.

Usage

logit_transform(x, buffer = 0.001)

Arguments

x

vector of values to transform. Must be between 0 and 1, inclusive.

buffer

numeric, the amount to nudge limit values inwards before transformation to avoid returning infinite values. Defaults to 0.001. Set to 0 to return infinite values. Setting to "estimate" will use the smallest distance from 0 or 1 in x as the buffer.

Value

a vector of the transformed values


mjdufort/miscHelpers documentation built on Feb. 4, 2024, 7:44 p.m.