R/util.R

Defines functions logit_inv logit

Documented in logit logit_inv

#' logit function
#' @param x numeric value for logit transformation
#' @examples
#' logit(0.5)
#' @export
logit <- function(x) log(x) - log(1-x)

#' inverse logit function
#' @param x numeric value for inverse logit transformation
#' @examples
#' logit_inv(0)
#' @export
logit_inv <- function(x) {
  exp(x) / (1 + exp(x))
}

Try the argo package in your browser

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

argo documentation built on May 31, 2023, 8:21 p.m.