logit: Logit function

View source: R/Math-Functions.R

logitR Documentation

Logit function

Description

Given a numeric object, return the logit of the values. Missing values (NAs) are allowed.

Usage

logit(x)

Arguments

x

a numeric object containing values between 0 and 1

Details

The logit is defined by log(x/(1-x)) . Values in x of 0 or 1 return logits of -Inf or Inf respectively. Any NAs in the input will also be NAs in the output.

Value

An object of the same type as x containing the logits of the input values.

Examples

logit(0.5)

landsepi documentation built on July 26, 2023, 5:36 p.m.