https://github.com/cran/ensembleBMA
Tip revision: f5ae722309f273a5b3e5fae294b71d73501cec72 authored by Chris Fraley on 15 July 2013, 00:00:00 UTC
version 5.0.4
version 5.0.4
Tip revision: f5ae722
inverseLogit.R
`inverseLogit` <-
function(x) {
#
# copyright 2006-present, University of Washington. All rights reserved.
# for terms of use, see the LICENSE file
if (is.na(x)) return(NA)
if (x >= 0) {
if (-x >= log(.Machine$double.eps)) {
x <- exp(-x)
1/(1+x)
}
else 1
}
else {
if (x >= log(.Machine$double.xmin)) {
x <- exp(x)
x/(1+x)
}
else 0
}
}