R/logit.R

Defines functions invlogit logit

Documented in invlogit logit

##' Logit function
##' @param x a number to transform
##' @seealso invlogit
##' @return A numeric
##' @export

logit <- function(x) log(x/(1-x))

##' Inverse logit function
##' @param x a number to transform
##' @seealso logit
##' @return A numeric
##' @export
invlogit <- function(x) 1/(1+exp(-x))

Try the NMcalc package in your browser

Any scripts or data that you put into this service are public.

NMcalc documentation built on Sept. 11, 2024, 7:51 p.m.