Residual Diagnostics for Multiple Fitted Models
Compares several fitted point process models using the same residual diagnostic.
compareFit(object, Fun, r = NULL, breaks = NULL, ..., trend = ~1, interaction = Poisson(), rbord = NULL, modelnames = NULL, same = NULL, different = NULL)
- Object or objects to be analysed.
Either a fitted point process model (object of class
"ppm"), a point pattern (object of class
"ppp"), or a list of these objects.
- Diagnostic function to be computed for each model.
One of the functions
psstGor a string containing one of these
- Optional. Vector of values of the argument $r$ at which the diagnostic should be computed. This argument is usually not specified. There is a sensible default.
- Optional alternative to
rfor advanced use.
- Extra arguments passed to
- Optional. Arguments passed to
ppmto fit a point process model to the data, if
objectis a point pattern or list of point patterns. See
- Character vector. Short descriptive names for the different models.
- Character strings or character vectors passed to
collapse.fvto determine the format of the output.
This is a convenient way to collect diagnostic information for several different point process models fitted to the same point pattern dataset, or for point process models of the same form fitted to several different datasets, etc.
The first argument,
object, is usually a list of
fitted point process models
(objects of class
"ppm"), obtained from the
object can also be a list of point patterns
(objects of class
In that case, point process models will be fitted to
each of the point pattern datasets,
ppm using the arguments
trend (for the first order trend),
interaction (for the interpoint interaction)
rbord (for the erosion distance in the border correction
for the pseudolikelihood). See
ppm for details
of these arguments.
object can be a single point pattern
(object of class
"ppp") and one or more of the arguments
can be a list. In this case, point process models will be fitted to
the same point pattern dataset, using each of the model specifications
The diagnostic function
Fun will be applied to each of the
point process models. The results will be collected into a single
function value table. The
modelnames are used to label the
results from each fitted model.
- Function value table (object of class
nd <- 40 <testonly>nd <- 10</testonly> ilist <- list(Poisson(), Geyer(7, 2), Strauss(7)) iname <- c("Poisson", "Geyer", "Strauss") K <- compareFit(swedishpines, Kcom, interaction=ilist, rbord=9, same="iso", different="icom", modelnames=iname, nd=nd) K