R/logit.R

Defines functions logit

Documented in logit

#' Logit helper function
#' 
#' @description defines the logit function
#' @usage logit(x)
#'
#' @export
#' @importFrom dplyr case_when
#' @keywords internal

logit <- function(x) {
  tmp <- exp(x)
  case_when(
    tmp == Inf ~ 1,
    tmp == -Inf ~ 0,
    T ~ tmp/(1 + tmp)
  )
}
snestler/wncaahoopR documentation built on Oct. 18, 2021, 2:11 p.m.