Learn R Programming

RBesT (version 1.11-0)

integrate_density.normMix: Integrate a function against a mixture density

Description

Computes \(\int g(x) f_{\text{mix}}(x) dx\) where \(f_{\text{mix}}\) is a mixture density. S3 generic dispatching on the mixture type.

Usage

# S3 method for normMix
integrate_density(mix, integrand, ...)

integrate_density(mix, integrand, ...)

# S3 method for default integrate_density( mix, integrand, Lplower = -Inf, Lpupper = Inf, eps = getOption("RBesT.integrate_prob_eps", 1e-06), ... )

Arguments

mix

mixture density to integrate over (dispatch argument)

integrand

function to integrate

...

additional arguments passed to methods

Methods (by class)

  • integrate_density(normMix): Gauss-Hermite method for normMix

  • integrate_density(default): Default method using adaptive integration