R/expit.R

Defines functions expit

Documented in expit

#' Expit function
#'
#' \eqn{\frac{\exp\{x\}}{1 + \exp\{x\}}}
#'
#' @param x A numeric value or vector to compute the expit function on.
#'
#' @return \code{expit} returns the result of the function
#'   \eqn{f(x) = \frac{\exp\{x\}}{1 + \exp\{x\}}} for a given \code{x}.
#'
expit <- function(x){
  expit_return = exp(x) / (1 + exp(x))
  return(expit_return)
  }

Try the COMBO package in your browser

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

COMBO documentation built on Oct. 30, 2024, 5:07 p.m.