Learn R Programming

polyCub (version 0.5-2)

circleCub.Gauss: Integration of the Isotropic Gaussian Density over Circular Domains

Description

This function calculates the integral of the bivariate, isotropic Gaussian density (i.e. \(\Sigma\) = sd^2*diag(2)) over circular domains via the cumulative distribution function of the (non-central) Chi-Squared distribution (pchisq), cp. Formula 26.3.24 in Abramowitz and Stegun (1972).

Usage

circleCub.Gauss(center, r, mean, sd)

Arguments

center
numeric vector of length 2 (center of the circle).
r
numeric (radius of the circle). Several radii may be supplied.
mean
numeric vector of length 2 (mean of the bivariate Gaussian density).
sd
numeric (common standard deviation of the isotropic Gaussian density in both dimensions).

Value

The integral value (one for each supplied radius).

References

Abramowitz, M. and Stegun, I. A. (1972). Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. New York: Dover Publications.

Examples

Run this code
circleCub.Gauss(center=c(1,2), r=3, mean=c(4,5), sd=6)

if (requireNamespace("mvtnorm") && gpclibPermit()) {
  ## compare with cubature over a polygonal approximation of a circle
  disc.poly <- spatstat::disc(radius=3, centre=c(1,2), npoly=32)
  polyCub.exact.Gauss(disc.poly, mean=c(4,5), Sigma=6^2*diag(2))
}

Run the code above in your browser using DataLab