Performs a chi-squared goodness-of-fit test of a Poisson point process model fitted to multiple point patterns.
# S3 method for mppm
quadrat.test(X, ...)
An object of class "htest"
.
Printing the object gives comprehensible output
about the outcome of the test.
The p.value
.
The return value also belongs to
the special class "quadrat.test"
. Plotting the object
will display, for each window, the position of the quadrats,
annotated by their observed and expected
counts and the Pearson residuals. See the examples.
The return value also has an attribute "components"
which is a list containing the results of
An object of class "mppm"
representing a
point process model fitted to multiple point patterns.
It should be a Poisson model.
Arguments passed to quadrat.test.ppm
which determine the size of the quadrats.
If the intention is to test Complete Spatial Randomness (CSR) there are two options:
CSR with the same intensity of points in each point pattern;
CSR with a different, unrelated intensity of points in each point pattern.
In the first case,
suppose P
is a list of point patterns we want to test.
Then fit the multiple model fit1 <- mppm(P ~1)
which signifies a
Poisson point process model with a constant intensity. Then
apply quadrat.test(fit1)
.
In the second case, fit the model fit2 <- mppm(P ~id)
which signifies a Poisson point process with a different constant
intensity for each point pattern. Then apply quadrat.test(fit2)
.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Ida-Maria Sintorn and Leanne Bischoff. Implemented by Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk.
This function performs a
The function quadrat.test
is generic, with methods for
point patterns (class "ppp"
), point process models
(class "ppm"
) and
multiple point process models (class
"mppm"
).
For this function, the argument X
should be a
multiple point process model (object of class "mppm"
)
obtained by fitting a point process model to a list of
point patterns using the function mppm
.
To perform the test, the data point patterns are extracted from X
.
For each point pattern
the window of observation is divided
into rectangular tiles, and the number of data points in each tile is
counted, as described in quadratcount
.
The expected number of points in each quadrat is calculated, as determined by the fitted model.
Then we perform a single
Baddeley, A., Rubak, E. and Turner, R. (2015) Spatial Point Patterns: Methodology and Applications with R. Chapman and Hall/CRC Press.
mppm
,
quadrat.test
H <- hyperframe(X=waterstriders)
# Poisson with constant intensity for all patterns
fit1 <- mppm(X~1, H)
quadrat.test(fit1, nx=2)
# uniform Poisson with different intensity for each pattern
fit2 <- mppm(X ~ id, H)
quadrat.test(fit2, nx=2)
Run the code above in your browser using DataLab