Learn R Programming

dbmss (version 1.2.4)

PopulationIndependence.M: Simulations of a point pattern according to the null hypothesis of population independence defined for M

Description

Simulates of a point pattern according to the null hypothesis of population independence defined for M

Usage

PopulationIndependence.M(X, ReferenceType)

Arguments

X
A point pattern (ppp.object), marks must be a dataframe with two columns: PointType: labels, as factors. PointWeight: weights.
ReferenceType
One of the point types.

Value

  • A new point pattern (an object of class ppp.object).

Details

Reference points are kept unchanged, other point are redistributed randomly accross locations.

References

Marcon, E. and Puech, F. (2010). Measures of the Geographic Concentration of Industries: Improving Distance-Based Methods. Journal of Economic Geography 10(5): 745-762. Marcon, E., F. Puech, et al. (2012). Characterizing the relative spatial structure of point patterns. International Journal of Ecology 2012(Article ID 619281): 11.

See Also

RandomLabeling.M, PopulationIndependence.K, RandomPosition.K

Examples

Run this code
# Simulate a point pattern with five types
X <- rpoispp(50) 
PointType   <- sample(c("A", "B", "C", "D", "E"), X$n, replace=TRUE)
PointWeight <- runif(X$n, min=1, max=10)
X$marks <- data.frame(PointType, PointWeight)

par(mfrow=c(1,2))
plot(X, main="Original pattern, Point Type")

# Randomize it
Y <- PopulationIndependence.M(X, "A")
# Invert the order of columns in mark to plot the point type, not the point weight
Y$marks <- data.frame(Y$marks$PointType, Y$marks$PointWeight)
# Points of type "A" (circles) are unchanged, 
# all other points have been redistributed randomly accross locations
plot(Y, main="Randomized pattern, Point Type")

Run the code above in your browser using DataLab