compareFit(object, Fun, r = NULL, breaks = NULL, ...,
trend = ~1, interaction = Poisson(), rbord = NULL,
modelnames = NULL, same = NULL, different = NULL)
"ppm"
),
a point pattern (object of class "ppp"
),
or a list of these objects.Kcom
, Kres
, Gcom
,
Gres
, psst
, psstA
or psstG
or a string containing one of theser
for advanced use.Fun
.collapse.fv
to
determine the format of the output."fv"
). 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.
ppm
,
Kcom
,
Kres
,
Gcom
,
Gres
,
psst
,
psstA
,
psstG
,
collapse.fv
data(swedishpines)
ilist <- list(Poisson(), AreaInter(7), Strauss(7))
iname <- c("Poisson", "AreaInter", "Strauss")
K <- compareFit(swedishpines, Kcom, interaction=ilist, rbord=9,
same="iso", different="icom", modelnames=iname)
K
Run the code above in your browser using DataLab