| polyCub.exact.Gauss | R Documentation |
This cubature method is defunct as of polyCub version 0.9.0.
It relied on tristrip() from package gpclib for polygon
triangulation, but that package did not have a FOSS license and
was no longer maintained on a mainstream repository.
Contributions to resurrect this cubature method are welcome: an alternative
implementation for constrained polygon triangulation is needed, see
https://github.com/bastistician/polyCub/issues/2.
polyCub.exact.Gauss(polyregion, mean = c(0, 0), Sigma = diag(2),
plot = FALSE)
polyregion |
a |
mean, Sigma |
mean and covariance matrix of the bivariate normal density to be integrated. |
plot |
logical indicating if an illustrative plot of the numerical
integration should be produced. Note that the |
The bivariate Gaussian density can be integrated based on a triangulation of
the (transformed) polygonal domain, using formulae from the
\bibcitetR:Abramowitz+Stegun:1972 handbook (Section 26.9, Example 9, pp. 956f.).
This method is quite cumbersome because the A&S formula is only for triangles
where one vertex is the origin (0,0). For each triangle
we have to check in which of the 6 outer
regions of the triangle the origin (0,0) lies and adapt the signs in the
formula appropriately: (AOB+BOC-AOC) or (AOB-AOC-BOC) or
(AOB+AOC-BOC) or (AOC+BOC-AOB) or ....
However, the most time consuming step is the
evaluation of pmvnorm.
The integral of the bivariate normal density over polyregion.
Two attributes are appended to the integral value:
nEval |
number of triangles over which the standard bivariate normal density had to
be integrated, i.e. number of calls to |
error |
Approximate absolute integration error stemming from the error introduced by
the |
*
circleCub.Gauss for quasi-exact cubature of the
isotropic Gaussian density over a circular domain.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.