as.function.leverage.ppm | R Documentation |
Converts an object of class "leverage.ppm"
to a function of the
x and y coordinates.
## S3 method for class 'leverage.ppm' as.function(x, ...)
x |
Object of class |
... |
Ignored. |
An object of class "leverage.ppm"
represents the leverage
function of a fitted point process model. This command converts the object
to a function(x,y)
where the arguments x
and y
are (vectors of) spatial
coordinates. This function returns the leverage values at the
specified locations (calculated by referring to the nearest location
where the leverage has been computed).
A function in the R language, also belonging to the
class "funxy"
.
.
as.im.leverage.ppm
X <- rpoispp(function(x,y) { exp(3+3*x) }) fit <- ppm(X ~x+y) lev <- leverage(fit) f <- as.function(lev) f(0.2, 0.3) # evaluate at (x,y) coordinates y <- f(X) # evaluate at a point pattern
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.