Description Usage Arguments Details Value Author(s) References Examples
Calculates log(1+exp(x))
in a numerically stable fashion.
1 | log1pexp(x)
|
x |
a numeric vector. |
We follow the recipe of Machler (2012), that is formula (10) page 7.
A numeric vector where the i-th entry is equal to log(1+exp(x[i]))
, but computed more stably.
Matteo Fasiolo <matteo.fasiolo@gmail.com>.
Machler, M. (2012). Accurately computing log(1-exp(-|a|)). URL: https://cran.r-project.org/package=Rmpfr/vignettes/log1mexp-note.pdf.
1 2 3 4 |
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-33. For overview type 'help("mgcv-package")'.
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[38] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[75] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.