Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.function.leverage.ppm

Convert Leverage Object to Function of Coordinates


Description

Converts an object of class "leverage.ppm" to a function of the x and y coordinates.

Usage

## S3 method for class 'leverage.ppm'
as.function(x, ...)

Arguments

x

Object of class "leverage.ppm" produced by leverage.ppm.

...

Ignored.

Details

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).

Value

A function in the R language, also belonging to the class "funxy".

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

See Also

Examples

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

spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.