R/transformations.r

Defines functions invlogit

Documented in invlogit

#' @title invlogit
#' @description Calculates the inverse logit
#' @details Maps the real line to [0, 1]
#' @author Jared P. Lander
#' @export invlogit
#' @rdname invlogit
#' @param x Vector of numbers
#' @return \code{x} mapped to [0, 1]
#' @examples 
#' invlogit(3)
#' invlogit(-6:6)
#' invlogit(c(-1, 1, 2))
#' 
invlogit <- function(x)
{
    1/(1 + exp(-x))
}

Try the coefplot package in your browser

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

coefplot documentation built on Jan. 16, 2021, 5:09 p.m.