"quadrat.test"(X, ...)
"mppm"
representing a
point process model fitted to multiple point patterns.
It should be a Poisson model.
quadrat.test.ppm
which determine the size of the quadrats.
"htest"
.
Printing the object gives comprehensible output
about the outcome of the test.
The $p$-value of the test is stored in the
component 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
$chi^2$ tests of goodness-of-fit
for each individual point pattern.
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 codefit2 <- mppm(P, ~id)
which signifies a Poisson point process with a different constant
intensity for each point pattern. Then apply quadrat.test(fit2)
. 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
quadratcount
.
Then we perform a single $chi^2$ test of goodness-of-fit based on these observed and expected counts.
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