Learn R Programming

pomp (version 0.45-8)

logmeanexp: The log-mean-exp trick

Description

logmeanexp computes the log-mean-exp of a set of numbers.

Usage

logmeanexp(x)

Arguments

Value

  • log(mean(exp(x))) computed so as to avoid over- or underflow.

Examples

Run this code
## 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)

Run the code above in your browser using DataLab