R/helper.R

Defines functions expit

Documented in expit

####################################
########## Function 1: Expit function
###################################

#' Expit function
#' 
#' @param x vector to expit
#' 
#' @return numeric vector with the value of the expit function 
#' y = expit(x) = exp(x)/(1+exp(x)).
#'
#' Expit helper function.

expit <- function(x){
  y = exp(x)/(1+exp(x))
  return(y)
}

Try the SynDI package in your browser

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

SynDI documentation built on May 25, 2022, 9:10 a.m.