integral_peak: Computes integral of a very peaked function

Description Usage Arguments Value References

View source: R/utils.R

Description

# computes the logarithm of the integral of exp(logfun) from 0 to Inf under the following assumptions:

Usage

1
2
integral_peak(logfun, xx = seq(-100, 10, 2), xcutoff = 2,
  ycutoff = 40, ymaxthreshold = 1e-12)

Arguments

logfun

the logarithm of the function to integrate

xx

the initial set of points on which to evaluate the function

xcutoff

when the maximum has been found among the xx, this parameter sets the width of the interval to find the maximum in

ycutoff

set the threshold below which (on a log scale) the function is deemed negligible, i.e. that it does not contribute to the integral)

ymaxthreshold

sets the deviation allowed in finding the maximum among the xx

Value

the result of the integration

References

Haegeman, B. & R.S. Etienne (2017). A general sampling formula for community structure data. Methods in Ecology & Evolution. In press.


SADISA documentation built on Oct. 30, 2019, 10:25 a.m.