| plot.leverage.ppm {spatstat.model} | R Documentation |
Plot Leverage Function
Description
Generate a pixel image plot, or a contour plot, or a perspective plot,
of a leverage function that has been computed by leverage.ppm.
Usage
## S3 method for class 'leverage.ppm'
plot(x, ...,
what=c("smooth", "nearest", "exact"),
showcut=TRUE,
args.cut=list(drawlabels=FALSE),
multiplot=TRUE)
## S3 method for class 'leverage.ppm'
contour(x, ...,
what=c("smooth", "nearest"),
showcut=TRUE,
args.cut=list(col=3, lwd=3, drawlabels=FALSE),
multiplot=TRUE)
## S3 method for class 'leverage.ppm'
persp(x, ...,
what=c("smooth", "nearest"),
main, zlab="leverage")
Arguments
x |
Leverage function (object of class |
... |
Arguments passed to |
what |
Character string (partially matched) specifying the values to be plotted. See Details. |
showcut |
Logical. If |
args.cut |
Optional list of arguments passed to
|
multiplot |
Logical value indicating whether it is permissible to display several plot panels. |
main |
Optional main title. A character string or character vector. |
zlab |
Label for the |
Details
These functions are the plot, contour and persp methods
for objects of class "leverage.ppm".
Such objects are computed by the command leverage.ppm.
The plot method displays the leverage function
as a colour pixel image using plot.im,
and draws a single contour line at the mean leverage value
using contour.default.
Use the argument clipwin to restrict the plot to a subset
of the full data.
The contour method displays the leverage function as a contour
plot, and also draws a single contour line at the mean leverage value,
using contour.im.
The persp method displays the leverage function as a surface
in perspective view, using persp.im.
Since the exact values of leverage are computed only at a finite set of quadrature locations, there are several options for these plots:
what="smooth":-
(the default) an image plot showing a smooth function, obtained by applying kernel smoothing to the exact leverage values;
what="nearest":-
an image plot showing a piecewise-constant function, obtained by taking the exact leverage value at the nearest quadrature point;
what="exact":-
a symbol plot showing the exact values of leverage as circles, centred at the quadrature points, with diameters proportional to leverage.
The pixel images are already contained in the object x
and were computed by leverage.ppm;
the resolution of these images is controlled
by arguments to leverage.ppm.
Value
Same as for plot.im, contour.im
and persp.im respectively.
Author(s)
Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk.
References
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.
See Also
Examples
if(offline <- !interactive()) op <- spatstat.options(npixel=32, ndummy.min=16)
X <- rpoispp(function(x,y) { exp(3+3*x) })
fit <- ppm(X ~x+y)
lef <- leverage(fit)
plot(lef)
contour(lef)
persp(lef)
if(offline) spatstat.options(op)