quadscheme.logi | R Documentation |
Generates a logistic regression quadrature scheme (an object of class
"logiquad"
inheriting from "quad"
)
from point patterns of data and dummy points.
quadscheme.logi(data, dummy, dummytype = "stratrand",
nd = NULL, mark.repeat = FALSE, ...)
data |
The observed data point pattern.
An object of class |
dummy |
The pattern of dummy points for the quadrature.
An object of class |
dummytype |
The name of the type of dummy points to use when |
nd |
Integer, or integer vector of length 2 controlling the intensity of
dummy points when |
mark.repeat |
Repeating the dummy points for each level of a marked data pattern
when |
... |
Ignored. |
This is the primary method for producing a quadrature schemes
for use by ppm
when the logistic regression
approximation (Baddeley et al. 2013) to the pseudolikelihood of the
model is applied (i.e. when method="logi"
in ppm
).
The function ppm
fits a point process model to an
observed point pattern. When used with the option method="logi"
it requires a quadrature scheme consisting of
the original data point pattern and an additional pattern of dummy points.
Such quadrature schemes are represented by objects of class
"logiquad"
.
Quadrature schemes are created by the function
quadscheme.logi
.
The arguments data
and dummy
specify the data and dummy
points, respectively. There is a sensible default for the dummy
points.
Alternatively the dummy points
may be specified arbitrarily and given in any format recognised by
as.ppp
.
The quadrature region is the region over which we are
integrating, and approximating integrals by finite sums.
If dummy
is a point pattern object (class "ppp"
)
then the quadrature region is taken to be Window(dummy)
.
If dummy
is just a list of x, y
coordinates
then the quadrature region defaults to the observation window
of the data pattern, Window(data)
.
If dummy
is missing, then a pattern of dummy points will be
generated, taking account of the optional arguments dummytype
,
nd
, and mark.repeat
.
The currently accepted values for dummytype
are:
"grid"
where the frame of the window
is divided into a nd * nd
or nd[1] * nd[2]
regular grid
of tiles and the centers constitutes the dummy points.
"transgrid"
where a regular grid as above is translated
by a random vector.
"stratrand"
where each point of a regular grid as above
is randomly translated within its tile.
"binomial"
where nd * nd
or nd[1] * nd[2]
points are generated uniformly in the frame of the
window.
"poisson"
where a homogeneous Poisson point process with
intensity nd * nd
or nd[1] * nd[2]
is
generated within the frame of observation window.
Then if the window is not rectangular, any dummy points lying outside it are deleted.
If data
is a multitype point pattern the dummy points should also
be marked (with the same levels of the marks as data
). If
dummy
is missing and the dummy pattern is generated by
quadscheme.logi
the default behaviour is to attach a uniformly
distributed mark (from the levels of the marks) to each dummy
point. Alternatively, if mark.repeat=TRUE
each dummy point is
repeated as many times as there are levels of the marks with a distinct
mark value attached to it.
Finally, each point (data and dummy) is assigned the weight 1. The
weights are never used and only appear to be compatible with the class
"quad"
from which the "logiquad"
object inherits.
An object of class "logiquad"
inheriting from "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"
.
.
Baddeley, A., Coeurjolly, J.-F., Rubak, E. and Waagepetersen, R. (2014) Logistic regression for spatial Gibbs point processes. Biometrika 101 (2) 377–392.
ppm
,
as.ppp
Q <- quadscheme.logi(simdat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.