ilogit: Vectorised inverse logit function

View source: R/utils.R

ilogitR Documentation

Vectorised inverse logit function

Description

Calculate the inverse logit function exp(x) / (1 + exp(x)). Modified from Faraway package. I added a check on x to avoid NaN in the output, which would occur when x is greater than about 750. Since exp(x) / (1 + exp(x)) = 1 for x>=20, I only check for x > 20 and output 1 for these cases.

Usage

ilogit(x)

Arguments

x

A numeric vector.

Value

exp(x)/(1+exp(x))


jedwards24/jemodel documentation built on July 1, 2023, 3:59 p.m.