fexpit: Helper function: expanded expit

View source: R/utils.R

fexpitR Documentation

Helper function: expanded expit

Description

Helper function: expanded expit

Usage

fexpit(x, sqz = 1e-06)

Arguments

x

a vector of values between -Inf and +Inf

sqz

the amount by which we 'squoze', default is .000001

Value

   a vector of values between 0 and 1 inclusive

Examples


  x <- rnorm(n=1000)
  summary(x) 

  sqz <- 1 / (10**6)
  p <- fexpit(x, sqz=sqz)
  summary(p)

  all( (abs(x - flogit(p)) / x) < sqz )
  all( abs(x - flogit(fexpit(x))) < sqz )


biobenkj/compartmap documentation built on Oct. 18, 2023, 11:11 a.m.