fexpit: Helper function: expanded expit

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Helper function: expanded expit

Usage

1
fexpit(x, sqz = 0.000001)

Arguments

x

a vector of values between -Inf and +Inf

sqz

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

Value

1
   a vector of values between 0 and 1 inclusive

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  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 )

JordanVeldboom/compartmap documentation built on July 3, 2020, 6:32 p.m.