anova.mppm  R Documentation 
Performs analysis of deviance for one or more point process models fitted to replicated point pattern data.
## S3 method for class 'mppm' anova(object, ..., test=NULL, adjust=TRUE, fine=FALSE, warn=TRUE)
object 
Object of class 
... 
Optional. Additional objects of class 
test 
Type of hypothesis test to perform.
A character string, partially matching one of

adjust 
Logical value indicating whether to correct the pseudolikelihood ratio when some of the models are not Poisson processes. 
fine 
Logical value passed to 
warn 
Logical value indicating whether to issue warnings if problems arise. 
This is a method for anova
for comparing several
fitted point process models of class "mppm"
,
usually generated by the modelfitting function mppm
).
If the fitted models are all Poisson point processes,
then this function performs an Analysis of Deviance of
the fitted models. The output shows the deviance differences
(i.e. 2 times log likelihood ratio),
the difference in degrees of freedom, and (if test="Chi"
)
the twosided pvalues for the chisquared tests. Their interpretation
is very similar to that in anova.glm
.
If some of the fitted models are not Poisson point processes,
the ‘deviance’ differences in this table are
'pseudodeviances' equal to 2 times the differences
in the maximised values of the log pseudolikelihood (see
ppm
). It is not valid to compare these
values to the chisquared distribution. In this case,
if adjust=TRUE
(the default), the
pseudodeviances will be adjusted using the method of Pace et al
(2011) and Baddeley, Turner and Rubak (2015)
so that the chisquared test is valid.
It is strongly advisable to perform this adjustment.
The argument test
determines which hypothesis test, if any, will
be performed to compare the models. The argument test
should be a character string, partially matching one of
"Chisq"
, "F"
or "Cp"
,
or NULL
. The first option "Chisq"
gives
the likelihood ratio test based on the asymptotic chisquared
distribution of the deviance difference.
The meaning of the other options is explained in
anova.glm
.
An object of class "anova"
, or NULL
.
For models with random effects
(i.e. where the call to mppm
included the argument random
),
analysis of deviance is currently not supported,
due to changes in the nlme package.
We will try to find a solution.
An error message that reports
system is computationally singular indicates that the
determinant of the Fisher information matrix of one of the models
was either too large or too small for reliable numerical calculation.
See vcov.ppm
for suggestions on how to handle this.
Adrian Baddeley, IdaMaria Sintorn and Leanne Bischoff. Implemented by \spatstatAuthors.
Baddeley, A., Rubak, E. and Turner, R. (2015) Spatial Point Patterns: Methodology and Applications with R. London: Chapman and Hall/CRC Press.
Baddeley, A., Turner, R. and Rubak, E. (2015) Adjusted composite likelihood ratio test for Gibbs point processes. Journal of Statistical Computation and Simulation 86 (5) 922–941. DOI: 10.1080/00949655.2015.1044530.
Pace, L., Salvan, A. and Sartori, N. (2011) Adjusting composite likelihood ratio statistics. Statistica Sinica 21, 129–148.
mppm
H < hyperframe(X=waterstriders) #' test for loglinear trend in x coordinate mod0 < mppm(X~1, data=H, Poisson()) modx < mppm(X~x, data=H, Poisson()) anova(mod0, modx, test="Chi") # not significant anova(modx, test="Chi") # not significant #' test for inhibition mod0S < mppm(X~1, data=H, Strauss(2)) anova(mod0, mod0S, test="Chi") # significant! #' test for trend after accounting for inhibition modxS < mppm(X~x, data=H, Strauss(2)) anova(mod0S, modxS, test="Chi") # not significant
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.