pixelquad(X, W = as.owin(X))
"ppp"
) containing the
data points for the quadrature scheme."im"
),
a window (object of class "owin"
), or anything that can
be converted to a window by as.owin
."quad"
describing the quadrature scheme
(data points, dummy points, and quadrature weights)
suitable as the argument Q
of the function ppm()
for
fitting a point process model. The quadrature scheme can be inspected using the
print
and plot
methods for objects
of class "quad"
.
ppm
. It is an alternative to
quadscheme
.
The function ppm
fits a point process model to an
observed point pattern using
the Berman-Turner quadrature approximation (Berman and Turner, 1992;
Baddeley and Turner, 2000) to the pseudolikelihood of the model.
It requires a quadrature scheme consisting of
the original data point pattern, an additional pattern of dummy points,
and a vector of quadrature weights for all these points.
Such quadrature schemes are represented by objects of class
"quad"
. See quad.object
for a description of this class.Given a grid of pixels, this function creates a quadrature scheme in which there is one dummy point at the centre of each pixel. The counting weights are used (the weight attached to each quadrature point is 1 divided by the number of quadrature points falling in the same pixel).
The argument X
specifies the locations of the data points
for the quadrature scheme. Typically this would be a point pattern
dataset.
The argument W
specifies the grid of pixels for the dummy
points of the quadrature scheme. It should be a pixel image
(object of class "im"
), a window (object of class
"owin"
), or anything that can
be converted to a window by as.owin
. If W
is a
pixel image or a binary mask (a window of type "mask"
)
then the pixel grid of W
will be used. If W
is a
rectangular or polygonal window, then it will first be converted to a
binary mask using as.mask
at the default pixel
resolution.
quadscheme
,
quad.object
,
ppm
W <- owin(c(0,1),c(0,1))
X <- runifpoint(42, W)
W <- as.mask(W,dimyx=128)
pixelquad(X,W)
Run the code above in your browser using DataLab