R/expit.R

Defines functions logit expit

Documented in expit logit

#' Expit transformation
#' 
#' @param x data
#' 
#' @return expit of x
#' 
#' @examples 
#' x <- .5
#' expit(x)
#' 
#' @export
expit <- function(x) {
    return(exp(x)/(1 + exp(x)))
}

#' Logit transformation 
#' 
#' @param x data
#' 
#' @return logit of x
#' 
#' @examples
#' x <- .5
#' logit(x)
#' 
#' @export
logit <- function(x) {
    log(x/(1 - x))
}

Try the SUMMER package in your browser

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

SUMMER documentation built on July 8, 2022, 9:05 a.m.