Compute Quadrature Weights Based on Grid Counts
Computes quadrature weights for a given set of points, using the ``counting weights'' for a grid of rectangular tiles.
gridweights(X, nx, ny, window=NULL)
- Data defining a point pattern.
- Number of tiles in each row of the rectangular grid.
- Number of tiles in each column of the rectangular grid.
- Default window for the point pattern
This function computes a set of quadrature weights
for a given pattern of points
(typically comprising both ``data'' and `dummy'' points).
quad.object for an explanation of quadrature
weights and quadrature schemes.
The weights are computed by the ``counting weights'' rule
based on a regular grid of rectangular tiles.
X and (optionally)
window are converted into a
point pattern object. Then the bounding rectangle of the window of
the point pattern is
divided into a regular $nx \times ny$ grid of rectangular tiles.
The weight attached to a point of
X is the area of the tile
in which it lies, divided by the number of points of
X lying in
- Vector of nonnegative weights for each point in
library(spatstat) Q <- quadscheme(runifpoispp(10)) X <- as.ppp(Q) # data and dummy points together w <- gridweights(X, 10, 10)