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

density.splitppp

Kernel Smoothed Intensity of Split Point Pattern


Description

Compute a kernel smoothed intensity function for each of the components of a split point pattern, or each of the point patterns in a list.

Usage

## S3 method for class 'splitppp'
density(x, ..., weights=NULL, se=FALSE)

  ## S3 method for class 'ppplist'
density(x, ..., weights=NULL, se=FALSE)

Arguments

x

Split point pattern (object of class "splitppp" created by split.ppp) to be smoothed. Alternatively a list of point patterns, of class "ppplist".

...

Arguments passed to density.ppp to control the smoothing, pixel resolution, edge correction etc.

weights

Numerical weights for the points. See Details.

se

Logical value indicating whether to compute standard errors as well.

Details

This is a method for the generic function density.

The argument x should be a list of point patterns, and should belong to one of the classes "ppplist" or "splitppp".

Typically x is obtained by applying the function split.ppp to a point pattern y by calling split(y). This splits the points of y into several sub-patterns.

A kernel estimate of the intensity function of each of the point patterns is computed using density.ppp.

The return value is usually a list, each of whose entries is a pixel image (object of class "im"). The return value also belongs to the class "solist" and can be plotted or printed.

If the argument at="points" is given, the result is a list of numeric vectors giving the intensity values at the data points.

If se=TRUE, the result is a list with two elements named estimate and SE, each of the format described above.

The argument weights specifies numerical case weights for the data points. Normally it should be a list, with the same length as x. The entry weights[[i]] will determine the case weights for the pattern x[[i]], and may be given in any format acceptable to density.ppp. For example, weights[[i]] can be a numeric vector of length equal to npoints(x[[i]]), a single numeric value, a numeric matrix, a pixel image (object of class "im"), or an expression.

For convenience, weights can also be a single expression or a single pixel image (object of class "im").

Value

A list of pixel images (objects of class "im") which can be plotted or printed; or a list of numeric vectors giving the values at specified points.

If se=TRUE, the result is a list with two elements named estimate and SE, each of the format described above.

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

Z <- density(split(amacrine), 0.05)
  plot(Z)

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.