fexpit: Helper function: expanded expit

View source: R/fexpit.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


  set.seed(1234)
  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 )


trichelab/biscuiteer documentation built on March 4, 2024, 12:22 a.m.