The log-mean-exp trick
log mean exp(x_i),
avoiding over- and under-flow in doing so. It can optionally return an estimate of the standard error in this quantity.
logmeanexp(x, se = FALSE)
logical; give approximate standard error?
se = TRUE,
logmeanexp uses a jackknife estimate of the variance in log(x).
log(mean(exp(x))) computed so as to avoid over- or underflow.
se = FALSE, the approximate standard error is returned as well.
Aaron A. King
1 2 3 4 5 6 7
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.