palmdiagnose | R Documentation |
Given a fitted cluster process or Cox process model, calculate a diagnostic which compares nonparametric and parametric estimates of the Palm intensity.
palmdiagnose(object, ..., breaks = 30, trim = 30, rmax=Inf)
object |
Fitted model (object of class |
... |
Optional.
Additional arguments which are fitted models of class |
breaks |
Optional argument passed to |
trim |
Optional. Maximum value of the translation edge correction weight. |
rmax |
Optional. Maximum interpoint distance |
This function computes the diagnostic proposed by Tanaka, Ogata and Stoyan (2008, Section 2.3) for assessing goodness-of-fit of a Neyman-Scott cluster process model to a point pattern dataset.
The fitted model object
should be an object of class "kppm"
representing a Neyman-Scott cluster process model or a Cox process
model. In the current implementation, the model must be stationary.
The code computes parametric and non-parametric estimates of the
Palm intensity \lambda_0(r)
, loosely speaking,
the intensity of the point process given that there is a point at the origin.
The parametric estimate is obtained from the fitted model by
substituting the fitted parameter estimates into
expressions for the pair correlation and the intensity.
The non-parametric estimate is obtained by considering all pairs of
data points, dividing the range of interpoint distances into
several equally-spaced bands (determined by the argument
breaks
), counting the number of pairs of points whose
interpoint distances fall in each band, and numerically adjusting for
edge effects. Tanaka, Ogata and Stoyan (2008) used the
periodic (toroidal) edge correction; our code uses the
translation edge correction so that the method can be applied to
data in any window.
The result is a function value table (object of class "fv"
)
containing the nonparametric and parametric estimates of the Palm
intensity. The result also belongs to the class "palmdiag"
which has a method for plot
. The default behaviour of
plot.palmdiag
is to plot the model fit as a curve,
and to display the nonparametric estimates as dots; this is the plot style
proposed by Tanaka, Ogata and Stoyan (2008). Alternative display
styles are also supported by plot.palmdiag
.
For computational efficiency, the argument rmax
specifies the maximum value of interpoint distance r
for which estimates of \lambda_0(r)
shall be computed.
The default rmax = Inf
implies
there is no constraint on interpoint distance,
and the resulting function object contains estimates of
\lambda_0(r)
up to
the maximum distance that would have been observable
in the window containing the original point pattern data.
If there are additional arguments ...
which are fitted models
of class "kppm"
, or if object
is a list of fitted models
of class "kppm"
, then the parametric estimates for each
of the fitted models will be included in the resulting function object.
If names are attached to these fitted models, the names will be used
in the resulting function object.
Function value table (object of class "fv"
) containing the
nonparametric and parametric estimates of the Palm intensity.
Also belongs to the class "palmdiag"
which has a plot
method.
.
Tanaka, U., Ogata, Y. and Stoyan, D. (2008) Parameter estimation and model selection for Neyman-Scott Point Processes. Biometrical Journal 50, 1, 43–57.
plot.palmdiag
fitK <- kppm(redwood)
R <- palmdiagnose(fitK)
plot(R)
fitg <- kppm(redwood, statistic="pcf")
R2 <- palmdiagnose(A=fitK, B=fitg)
plot(R2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.