"anova"(object, ..., test=NULL)
"lppm"
).
"Chisq"
, "F"
or "Cp"
.
"anova"
, or NULL
.
~x
is a special case of the model with
formula ~x+y
, so these models are nested. However
the two point process
models with formulae ~x
and ~y
are not nested. If you get this error message and you believe that the models should
be nested, the problem may be the inability of R to recognise that
the two formulae are nested. Try modifying the formulae to make
their relationship more obvious.
anova.glmlist
that
models were not all fitted to the same size of dataset.
This generally occurs when the point process models
are fitted on different linear networks.
anova
for
fitted point process models on a linear network
(objects of class "lppm"
,
usually generated by the model-fitting function lppm
). 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 two-sided p-values for the chi-squared tests. Their interpretation
is very similar to that in anova.glm
.
If some of the fitted models are not Poisson point processes, then the deviance difference is replaced by the adjusted composite likelihood ratio (Pace et al, 2011; Baddeley et al, 2014).
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.
McSwiggan, G., Nair, M.G. and Baddeley, A. (2012) Fitting Poisson point process models to events on a linear network. Manuscript in preparation.
Pace, L., Salvan, A. and Sartori, N. (2011) Adjusting composite likelihood ratio statistics. Statistica Sinica 21, 129--148.
lppm
X <- runiflpp(10, simplenet)
mod0 <- lppm(X ~1)
modx <- lppm(X ~x)
anova(mod0, modx, test="Chi")
Run the code above in your browser using DataLab