gridweights

0th

Percentile

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.

Keywords
spatial
Usage
gridweights(X, ntile, ..., window=NULL, verbose=FALSE)
Arguments
X
Data defining a point pattern.
ntile
Number of tiles in each row and column of the rectangular grid. An integer vector of length 1 or 2.
...
Ignored.
window
Default window for the point pattern
verbose
Logical flag. If TRUE, information will be printed about the computation of the grid weights.
Details

This function computes a set of quadrature weights for a given pattern of points (typically comprising both ``data'' and `dummy'' points). See 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. First 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 ntile[1] * ntile[2] 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 that tile.

Value

  • Vector of nonnegative weights for each point in X.

See Also

quad.object, dirichlet.weights

Aliases
  • gridweights
Examples
Q <- quadscheme(runifpoispp(10))
  X <- as.ppp(Q) # data and dummy points together
  w <- gridweights(X, 10)
  w <- gridweights(X, c(10, 10))
Documentation reproduced from package spatstat, version 1.5-5, License: GPL version 2 or newer

Community examples

Looks like there are no examples yet.