rPopulationIndependenceK {dbmss} | R Documentation |
Simulates of a point pattern according to the null hypothesis of population independence defined for K.
rPopulationIndependenceK(X, ReferenceType, NeighborType, CheckArguments = TRUE)
X |
A weighted, marked, planar point pattern ( |
ReferenceType |
One of the point types. |
NeighborType |
One of the point types. |
CheckArguments |
Logical; if |
Reference points are kept unchanged, other point positions are shifted by rshift
.
A new weighted, marked, planar point pattern (an object of class wmppp
, see wmppp.object
).
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.
rPopulationIndependenceM
, rRandomLabeling
# 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)
X <- as.wmppp(X)
par(mfrow=c(1,2))
# Plot the point pattern, using PointType as marks
plot(X, main="Original pattern, Point Type", which.marks=2)
# Randomize it
Y <- rPopulationIndependenceK(X, "A", "B")
# Points of type "A" are unchanged, points of type "B" have been moved altogether
plot(Y, main="Randomized pattern, Point Type", which.marks=2)