Learn R Programming

FatTailsR (version 2.0.0)

logit: Logit and Invlogit Functions

Description

The logit and invlogit functions, widely used in this package, are wrappers of qlogis and plogis functions.

Usage

logit(p)

invlogit(x)

Arguments

p

numeric. one value or a vector between 0 and 1.

x

numeric. one value or a vector of numerics.

Details

logit function is defined for p in (0, 1) by: $$ logit(p) = log( p/(1-p) ) $$

invlogit function is defined for x in (-Inf, +Inf) by: $$ invlogit(x) = exp(x)/(1+exp(x)) = plogis(x) $$

Examples

Run this code
    
logit( c(ppoints(11, a = 1), NA, NaN) )
invlogit( c(-Inf, -10:10, +Inf, NA, NaN) )

Run the code above in your browser using DataLab