ecd.integrate: Wrapper to integrate numeric and mpfr

View source: R/ecd-integrate-method.R

ecd.integrateR Documentation

Wrapper to integrate numeric and mpfr

Description

The wrapper handles chooses to to use integrate for numeric; or to use integrateR for mpfr. Since the later doesn't allow infinity, there is a special handling to replace infinity with a large multiple of sigma.

Usage

ecd.integrate(
  object,
  f,
  lower,
  upper,
  ...,
  abs.tol = .Machine$double.eps^0.25,
  mpfr.qagi = TRUE,
  show.warning = TRUE
)

Arguments

object

An object of ecd class. This object can be bare-boned.

f

An R function taking a numeric first argument and returning a numeric vector of the same length. Returning a non-finite element will generate an error.

lower

Numeric, the lower limit of integration. Can be infinite.

upper

Numeric, the upper limit of integration. Can be infinite.

...

Addtional arguments for f.

abs.tol

numeric, the suggested absolute tolerance.

mpfr.qagi

logical, to use quadpack qagi transformation for infinity.

show.warning

logical, to suppress warnings or not.

Value

The integrate object

Author(s)

Stephen H. Lihn


ecd documentation built on May 10, 2022, 1:07 a.m.