ppStatsBi: Bivariate Point Pattern Statistics Calculation

View source: R/neighborsPointPattern.R

ppStatsBiR Documentation

Bivariate Point Pattern Statistics Calculation

Description

Compute point pattern multiscale statistics K-Ripley, L-Ripley and O-Ring for a bivariate point pattern. K-Ring is a statistics based on mean number of neighbors of type 2 point around each point of type 1 in a function of the neighbourhood distances divide by the intensity of points $\lambda$. The expected K-Ripley for complete random distribution is equal $pi * r^2$. L-Ripley is define here as $\sqrtK_(r)/\pi - r$ an parametrization to have expectance equal zero. O-Ring calculate L-Ripley for a ring of width equal to 'step' argument.

Usage

ppStatsBi(
  x,
  y,
  code,
  xlim = c(0, 1),
  ylim = c(0, 1),
  rMax = min(c(xlim[2], ylim[2]))/4,
  step = rMax/100,
  ways = c("order", "reverse", "both")
)

Arguments

x, y

Numeric vectors with 'x' and 'y' coordinates in a cartesian space. They must have the same length.

code

factor vector with two levels and same length as 'x' and 'y'

xlim, ylim

Numeric vectors with two values defining the 'x' and 'y' axis limit in the cartesian plane.

rMax

maximum distance for neighborhood definition.

step

increase distance size for neighborhood.

ways

type of bivariate calculation: 'order' uses first levels as target points; 'reverse' uses second level as target points; 'both' calculate the two bivariates means.

Value

'ppStats' returns a data frame with numeric vectors. The first 'r' represents the neighborhood distance definition; ” the mean number of neighbors for each 'r' distance. This count uses the torus border correction.

Author(s)

Alexandre Adalardo de Oliveira aleadalardo@gmail.com

References

Baddeley, A.; Rubak, E; Turner, R. 2016. Spatial Point Patterns: Methodology and Applications with R. CRC Press. Wiegand, T. & Moloney, K.A. 2014. Handbook of Spatial Point-Pattern Analysis in Ecology. CRC Press.

Examples

## Not run: 
ppStatsBi(x = runif(100), y = runif(100), code = factor(rep(c("type1", "type2"), each = 50)), xlim = c(0,1), ylim = c(0,1), rMax = 0.25, step = 0.02)

## End(Not run)

adalardo/Rppsp documentation built on June 10, 2025, 1:11 p.m.