compareFit | R Documentation |
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 |
Object or objects to be analysed.
Either a fitted point process model (object of class |
Fun |
Diagnostic function to be computed for each model.
One of the functions |
r |
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. |
breaks |
Optional alternative to |
... |
Extra arguments passed to |
trend,interaction,rbord |
Optional. Arguments passed to |
modelnames |
Character vector. Short descriptive names for the different models. |
same,different |
Character strings or character vectors passed to
|
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
model-fitting function ppm
.
For convenience, object
can also be a list of point patterns
(objects of class "ppp"
).
In that case, point process models will be fitted to
each of the point pattern datasets,
by calling ppm
using the arguments
trend
(for the first order trend),
interaction
(for the interpoint interaction)
and rbord
(for the erosion distance in the border correction
for the pseudolikelihood). See ppm
for details
of these arguments.
Alternatively object
can be a single point pattern
(object of class "ppp"
) and one or more of the arguments
trend
, interaction
or rbord
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
listed.
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 "fv"
).
, \adrian and Jesper \Moller.
ppm
,
Kcom
,
Kres
,
Gcom
,
Gres
,
psst
,
psstA
,
psstG
,
collapse.fv
nd <- 40 ilist <- list(Poisson(), Geyer(7, 2), Strauss(7)) iname <- c("Poisson", "Geyer", "Strauss") K <- compareFit(swedishpines, Kcom, interaction=ilist, rbord=9, correction="translate", same="trans", different="tcom", modelnames=iname, nd=nd) K
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.