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

Extract.leverage.ppm

Extract Subset of Leverage Object


Description

Extract a subset of a leverage map, or extract the leverage values at specified locations.

Usage

## S3 method for class 'leverage.ppm'
x[i, ..., update=TRUE]

Arguments

x

A leverage object (of class "leverage.ppm") computed by leverage.ppm.

i

Subset index (passed to [.im). Either a spatial window (object of class "owin") or a spatial point pattern (object of class "ppp").

...

Further arguments passed to [.im, especially the argument drop.

update

Logical value indicating whether to update the internally-stored value of the mean leverage, by averaging over the specified subset.

Details

An object of class "leverage.ppm" contains the values of the leverage function for a point process model, computed by leverage.ppm.

This function extracts a designated subset of the leverage values, either as another leverage object, or as a vector of numeric values.

The function [.leverage.ppm is a method for [ for the class "leverage.ppm". The argument i should be either

  • a spatial window (object of class "owin") determining a region where the leverage map is required. The result will typically be another leverage map (object of class leverage.ppm).

  • a spatial point pattern (object of class "ppp") specifying locations at which the leverage values are required. The result will be a numeric vector.

The subset operator for images, [.im, is applied to the leverage map. If this yields a pixel image, then the result of [.leverage.ppm is another leverage object. Otherwise, a vector containing the numeric values of leverage is returned.

Value

Another object of class "leverage.ppm", or a vector of numeric values of leverage.

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

fit <- ppm(cells ~x)
   lev <- leverage(fit)
   b <- owin(c(0.1, 0.3), c(0.2, 0.4))
   lev[b]
   lev[cells]

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.