logit: The Logit Function

Description Usage Arguments Details Value See Also

View source: R/logit.R

Description

The logit function and its inverse expit. This is used as the link function for the prevalence regression in the FCS2 model to transform the interval (0, 1) to the real line.

Usage

1
2
3
4
5
logit(x)

expit(x)

expit(x)

Arguments

x

a numeric vector or matrix

Details

The logit transformation is defined by logit(x) = log(x) - log(1 - x) so that its inverse expit is given by expit(x) = 1 / (1 + exp(-x)).

Value

A vector or matrix the same size as x containing the transformed values.

See Also

log for the natural logarithm and prevalence for producing samples of the prevalence model component, using the logit transformation.


aquaMetrics/fcs2 documentation built on Aug. 21, 2021, 12:55 p.m.