# quad.object

##### Class of Quadrature Schemes

A class `"quad"`

to represent a quadrature scheme.

- Keywords
- spatial

##### Details

A (finite) quadrature scheme is a list of quadrature points
$u_j$ and associated weights $w_j$
which is used to approximate an integral by a finite sum:
$$\int f(x) dx \approx \sum_j f(u_j) w_j$$
Given a point pattern dataset, a *Berman-Turner*
quadrature scheme is one which includes all these data points,
as well as a nonzero number of other (``dummy'') points.

These quadrature schemes are used to approximate the pseudolikelihood of a point process, in the method of Baddeley and Turner (2000) (see Berman and Turner (1992)). Accuracy and computation time both increase with the number of points in the quadrature scheme.

An object of class `"quad"`

represents a Berman-Turner
quadrature scheme. It can be passed as an argument to
the model-fitting function `ppm`

, which
requires a quadrature scheme.

An object of this class contains at least the following elements:
`data`

: an object of class `"ppp"`

giving the locations (and marks) of the data points.
`dummy`

: an object of class `"ppp"`

giving the locations (and marks) of the dummy points.
`w`

: vector of nonnegative weights for the quadrature points
}
Users are strongly advised not to manipulate these entries
directly.
The domain of quadrature is specified by `dummy$window`

while the observation window (if this needs to be specified
separately) is taken to be `data$window`

.

The weights vector `w`

may also have an attribute
`attr(w, "zeroes")`

equivalent to the logical vector
`(w == 0)`

. If this is absent then all points are known to
have positive weights.
To create an object of class `"quad"`

,
users would typically call the
high level function `quadscheme`

.
(They are actually
created by the low level function `quad`

.)
Entries are extracted from a `"quad"`

object by the functions
`x.quad`

,
`y.quad`

,
`w.quad`

and
`marks.quad`

,
which extract the $x$ coordinates, $y$ coordinates,
weights, and marks, respectively. The function
`n.quad`

returns the total number of quadrature points
(dummy plus data).

An object of class `"quad"`

can be converted into an ordinary
point pattern by the function `union.quad`

which simply
takes the union of the data and dummy points.

Quadrature schemes can be plotted using `plot.quad`

(a method for the generic `plot`

).

##### See Also

*Documentation reproduced from package spatstat, version 1.6-2, License: GPL version 2 or newer*