## S3 method for class 'ppm':
influence(model, ..., drop = FALSE, iScore=NULL, iHessian=NULL, iArgs=list())"ppm").drop=FALSE) or
exclude (drop=TRUE) contributions from quadrature
points that were not used to fit the model.iScore,
iHessian if required."influence.ppm" that can be plotted
by plot.influence.ppm.model,
this function computes the influence measure
described in Baddeley, Chang and Song (2011).
The function influence is generic,
and influence.ppm is the method for objects of class
"ppm" representing point process models. The influence of a point process model is a value attached to each data point
(i.e. each point of the point pattern to which the model
was fitted).
The influence value $s(x_i)$ at a data point
$x_i$ represents the change in the maximised log (pseudo)likelihood
that occurs when the point $x_i$ is deleted.
A relatively large value of $s(x_i)$ indicates a
data point with a large influence on the fitted model.
If the point process model trend has irregular parameters that were
fitted (using ippm)
then the influence calculation requires the first and second
derivatives of the log trend with respect to the irregular parameters.
The argument iScore should be a list,
with one entry for each irregular parameter, of Rfunctions that compute the
partial derivatives of the log trend (i.e. log intensity or
log conditional intensity) with respect to each irregular
parameter. The argument iHessian should be a list,
with $p^2$ entries where $p$ is the number of irregular
parameters, of Rfunctions that compute the second order
partial derivatives of the
log trend with respect to each pair of irregular parameters.
The result of influence.ppm is
an object of class "influence.ppm". It can be plotted
(by plot.influence.ppm), or converted to a marked
point pattern by as.ppp (see as.ppp.influence.ppm).
leverage.ppm,
dfbetas.ppm,
plot.influence.ppmX <- rpoispp(function(x,y) { exp(3+3*x) })
fit <- ppm(X, ~x+y)
plot(influence(fit))Run the code above in your browser using DataLab