flogit: Helper function: squeezed logit

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Helper function: squeezed logit

Usage

1
flogit(p, sqz = 0.000001)

Arguments

p

a vector of values between 0 and 1 inclusive

sqz

the amount by which to 'squeeze', default is .000001

Value

1
   a vector of values between -Inf and +Inf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  set.seed(1234)
  p <- runif(n=1000)
  summary(p) 

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

  all( abs(p - fexpit(x, sqz=sqz)) < sqz )
  all( abs(p - fexpit(flogit(p, sqz=sqz), sqz=sqz)) < sqz ) 

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