`logmeanexp`

computes

*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.

1 | ```
logmeanexp(x, se = FALSE)
``` |

`x` |
numeric |

`se` |
logical; give approximate standard error? |

When `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.
If `se = FALSE`

, the approximate standard error is returned as well.

Aaron A. King

1 2 3 4 5 6 7 | ```
## generate a bifurcation diagram for the Ricker map
pompExample(ricker)
ll <- replicate(n=5,logLik(pfilter(ricker,Np=1000)))
## an estimate of the log likelihood:
logmeanexp(ll)
## with standard error:
logmeanexp(ll,se=TRUE)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.