An R package providing methods for **cubature** (numerical integration) **over polygonal domains**. Note that for cubature over simple hypercubes, the packages `cubature`

and `R2Cuba`

might be more appropriate (cf. `CRAN Task View: Numerical Mathematics`

).

The function `polyCub()`

is the main entry point of the package. It is a wrapper around the following specific cubature methods.

`polyCub.midpoint()`

: Two-dimensional midpoint rule (a simple wrapper around`spatstat`

’s`as.im.function()`

)`polyCub.SV()`

: Product Gauss cubature as proposed by Sommariva and Vianello (2007,*BIT Numerical Mathematics*)

`polyCub.iso()`

: Efficient adaptive cubature for*isotropic*functions via line`integrate()`

along the polygon boundary, as described in Supplement B of Meyer and Held (2014,*The Annals of Applied Statistics*)`polyCub.exact.Gauss()`

and`circleCub.Gauss()`

: Quasi-exact methods specific to the integration of the*bivariate Gaussian density*over polygonal and circular domains, respectively

For any spatio-temporal point process model, the likelihood contains an integral of the conditional intensity function over the observation region. If this is a polygon, analytical solutions are only available for trivial cases of the intensity function - thus the need of a cubature method over polygonal domains.

My Master’s Thesis (2010) on “Spatio-Temporal Infectious Disease Epidemiology based on Point Processes” is the origin of this package. Section 3.2 therein offers a more detailed description and benchmark experiment of some of the above cubature methods (and others).

The implementation then went into the `surveillance`

package, where it is used to fit `twinstim()`

, self-exciting two-component spatio-temporal point process models, described in Meyer et al (2012, *Biometrics*). In May 2013, I decided to move the cubature functionality into a stand-alone package, since it might be useful for other projects as well. Subsequently, I developed the isotropic cubature method `polyCub.iso()`

to efficiently estimate point process models with a power-law distance decay of interaction (Meyer and Held, 2014, *The Annals of Applied Statistics*).