
Computes the leverage measure for a fitted spatial point process model.
leverage(model, …)# S3 method for ppm
leverage(model, …,
drop = FALSE, iScore=NULL, iHessian=NULL, iArgs=NULL)
Fitted point process model (object of class "ppm"
).
Ignored, except for the arguments dimyx
and eps
which are passed to as.mask
to control the spatial resolution of the result.
Logical. Whether to include (drop=FALSE
) or
exclude (drop=TRUE
) contributions from quadrature
points that were not used to fit the model.
Components of the score vector and Hessian matrix for the irregular parameters, if required. See Details.
List of extra arguments for the functions iScore
,
iHessian
if required.
An object of class "leverage.ppm"
.
The function leverage
is generic, and
leverage.ppm
is the method for objects of class "ppm"
.
Given a fitted spatial point process model model
,
the function leverage.ppm
computes the leverage of the model,
described in Baddeley, Chang and Song (2013).
The leverage of a spatial point process model
is a function of spatial location, and is typically
displayed as a colour pixel image.
The leverage value
If the point process model trend has irregular parameters that were
fitted (using ippm
)
then the leverage 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 R functions 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
The result of leverage.ppm
is an object of
class "leverage.ppm"
. It can be printed or plotted.
It can be converted to a pixel image
by as.im
(see as.im.leverage.ppm
).
There are also methods for contour
, persp
,
[
, as.function
,
as.owin
, domain
, Smooth
,
integral
, and mean
.
Baddeley, A., Chang, Y.M. and Song, Y. (2013) Leverage and influence diagnostics for spatial point process models. Scandinavian Journal of Statistics 40, 86--104.
influence.ppm
,
dfbetas.ppm
,
ppmInfluence
,
plot.leverage.ppm
as.function.leverage.ppm
# NOT RUN {
X <- rpoispp(function(x,y) { exp(3+3*x) })
fit <- ppm(X ~x+y)
plot(le <- leverage(fit))
mean(le)
# }
Run the code above in your browser using DataLab