ilogit: Vectorised inverse logit function

ilogitR Documentation

Vectorised inverse logit function

Description

Calculate the inverse logit function exp(x) / (1 + exp(x)). Modified from Faraway package. The original allowed for some elements to be NA which this does not. I added a check on x to avoid NaN. This occurs when x is greater than about 750 but, 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.


jedwards24/edwards documentation built on Sept. 2, 2023, 8:16 a.m.