flogit: Helper function: squeezed logit

View source: R/utils.R

flogitR Documentation

Helper function: squeezed logit

Description

Helper function: squeezed logit

Usage

flogit(p, sqz = 1e-06)

Arguments

p

a vector of values between 0 and 1 inclusive

sqz

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

Value

   a vector of values between -Inf and +Inf

Examples


  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 ) 


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