Learn R Programming

dbmss (version 1.2.4)

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

Description

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

Usage

PopulationIndependence.K(X, ReferenceType, NeighborType)

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.
NeighborType
One of the point types.

Value

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

Details

Reference points are kept unchanged, other point positions are randomized by rshift.

References

Goreaud, F. et Pelissier, R. (2003). Avoiding misinterpretation of biotic interactions with the intertype K12 fonction: population independence vs random labelling hypotheses. Journal of Vegetation Science 14(5): 681-692.

See Also

RandomPosition.K, PopulationIndependence.M, RandomLabeling.M

Examples

Run this code
# Simulate a point pattern with two types
X <- rpoispp(50) 
PointType   <- sample(c("A", "B"), 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.K(X, "A", "B")
# 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" are unchanged, points of type "B" have been moved altogether
plot(Y, main="Randomized pattern, Point Type")

Run the code above in your browser using DataLab